Re: app controller's dealloc not called
Re: app controller's dealloc not called
- Subject: Re: app controller's dealloc not called
- From: Conor Dearden <email@hidden>
- Date: Sun, 19 Mar 2006 12:13:31 +0100
Worry not about dealloc on application termination. Worry about memory
mangement in objects you create and destroy as your application is running.
Objects created in IB have a very complicated memory structure, for example
calling dealloc on self 3 times on applicationWillTerminate is not the
correct way to go as that object is still retained by the NSApp the sender
of that notification as well as others. The entire protected memory is
returned to the system when you application terminates. Of course add other
clean up code to applicationWillTerminate such as saving files.
To paraphrase the documentation you never sent an alloc, copy, malloc or
retain to the IB created object then don't send a release or in your case a
dealloc.
Conor
http://www.bruji.com/
_______________________________________________
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