Hi, I've been looking into creating a singleton class to manage some objects that I have that I'd like to be globally available. I've been reading through http://www.cocoadev.com/index.pl?SingletonDesignPattern and all looks well except I now have the following question ...
I'd like my singleton to observe the NSWorkspace notifications applicationDidLaunch and applicationDidTerminate. I can setup the observations in the init method, but how to I go about removing them ? You would normally do in the dealloc method, but it seems you're not meant to override dealloc in a singleton ? Would it suffice to put them in the overridden release method ? If so, does this get called automatically when I close the application ? If I can't remove the notifications, I could end up with the notification centre try to foward them to an object that no longer exists. Thanks -Mic _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com