• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cleaning up a singleton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Cleaning up a singleton (From: Sebastian Nowicki <email@hidden>)
 >Re: Cleaning up a singleton (From: Andrew Merenbach <email@hidden>)
 >Re: Cleaning up a singleton (From: Sebastian Nowicki <email@hidden>)
 >Re: Cleaning up a singleton (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Query about Zip command
  • Next by Date: Change the Language of just one Application
  • Previous by thread: Re: Cleaning up a singleton
  • Next by thread: Re: Cleaning up a singleton
  • Index(es):
    • Date
    • Thread