Re: when should my NSWindowController be released?
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