• 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: when should my NSWindowController be released?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when should my NSWindowController be released?


  • Subject: Re: when should my NSWindowController be released?
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 12 Sep 2008 19:53:31 -0500

On Sep 12, 2008, at 4:44 PM, Paul Archibald wrote:

So, what is the general outline of properly allocating, initializing and deallocating an application and its elements? Can someone point me to the right documentation? I can't seem to find reference to this subject.

Here's the Memory Management Guide: http://developer.apple.com/ documentation/Cocoa/Conceptual/MemoryMgmt/index.html


Cocoa doesn't bother doing a full release/dealloc of your application object (and the things it owns) at application termination. The principle is that the OS is about to cleanup the whole process's address space in one fell swoop, so there's no point in doing it piecemeal first.

If you need to do work other than memory management (e.g. cleaning up other types of resources), then -applicationWillTerminate: is the right place to do it.

Cheers,
Ken

_______________________________________________

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


  • Follow-Ups:
    • Re: when should my NSWindowController be released?
      • From: Jamie Hardt <email@hidden>
References: 
 >when should my NSWindowController be released? (From: Paul Archibald <email@hidden>)

  • Prev by Date: Re: App name from Bundle Identifier?
  • Next by Date: Re: when should my NSWindowController be released?
  • Previous by thread: when should my NSWindowController be released?
  • Next by thread: Re: when should my NSWindowController be released?
  • Index(es):
    • Date
    • Thread