Re: when should my NSWindowController be released?
Re: when should my NSWindowController be released?
- Subject: Re: when should my NSWindowController be released?
- From: Markus Spoettl <email@hidden>
- Date: Fri, 12 Sep 2008 23:53:47 -0700
On Sep 12, 2008, at 8:44 PM, Michael Ash wrote:
The NSDocument and any/all associated NSWindowControllers should be
closed and then deallocated when the document itself is closed. If
your window controllers aren't being deallocated then you have a
memory management bug somewhere.
I have observed the following in my application:
When the document is closed while the application keeps running, my
document, window controller and dependent windows get deallocated as
expected.
However, when the document closes while during application
termination, the document and window controller get deallocated, but
the document window are not (as a result lots of other things don't
get deallocated).
The fact that the document and all it's dependent structures get
deallocated in the first case tells me that my memory management is
working correctly.
I have - maybe incorrectly - come to the conclusion that the system/
Cocoa retains windows and doesn't release them during app shutdown. Am
I mistaken?
Markus
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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