• 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: Writing a method like "sharedApplication"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing a method like "sharedApplication"


  • Subject: Re: Writing a method like "sharedApplication"
  • From: Todd Yandell <email@hidden>
  • Date: Wed, 19 Jan 2005 21:50:19 -0600

You want a singleton. See <http://www.cocoadev.com/index.pl?SingletonDesignPattern>

As far as releasing it, it'll be released anyway when the app exits, so there's no real need to unless you need to do some other cleanup, in which case you can register for NSApplication's applicationWillTerminate: notification.

Thanks, just what I was looking for!

Todd

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Writing a method like "sharedApplication" (From: Todd Yandell <email@hidden>)
 >Re: Writing a method like "sharedApplication" (From: "John C. Warner" <email@hidden>)

  • Prev by Date: Re: Writing a method like "sharedApplication"
  • Next by Date: Re: NSTask, NSApp, and hiding
  • Previous by thread: Re: Writing a method like "sharedApplication"
  • Next by thread: Cocoa bindings and a custom view...
  • Index(es):
    • Date
    • Thread