Re: Cleaning up a singleton
Re: Cleaning up a singleton
- Subject: Re: Cleaning up a singleton
- From: Sebastian Nowicki <email@hidden>
- Date: Sat, 24 May 2008 16:15:40 +0800
On 24/05/2008, at 3:48 PM, Andreas Mayer wrote:
In case you use the notification, there is no need to expose
anything. You just register a method of your singleton to receive
the NSApplicationWillTerminateNotification and do your cleanup there.
On Apple's developer website there are several example projects that
make use of this. Here's one:
http://developer.apple.com/samplecode/CapabilitiesSample/listing5.html
You need only look at the -init and the -applicationWillTerminate:
methods.
Andreas
Oh, that is awesome. Thanks for pointing it out.
--
Sebastian Nowicki
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden