From starmessage@21:1/5 to All on Mon Jan 18 05:26:03 2016
I too have this problem.
I am porting my windows screensaver ( http://starmessagesoftware.com/moonscreensaver/ )
to MAC and the function dealloc is not always called:
-dealloc is called when the screen saver was instantiated by SSystem Preferences;
-dealloc is not called when ScreenSaverEngine runs the saver.
I never had such inconsistency problems when working with the screensaver messages on the windows platform.
Everything is rational and systematic on windows' API.