Re: Closing vs quitting documents
Re: Closing vs quitting documents
- Subject: Re: Closing vs quitting documents
- From: Ricky Sharp <email@hidden>
- Date: Tue, 29 Mar 2005 08:27:01 -0600
On Tuesday, March 29, 2005, at 07:50AM, Serge Meynard <email@hidden> wrote:
>Can someone provide a better understanding of what's going on when I
>quit? Why are the overlay windows being released one too many times by
>the framework? Why is dealloc not being called systematically? I can
>imagine ways of working around this, by moving the code out of the
>dealloc and checking if the app is quitting or not, but I would hate to
>go there without even knowing what the cause is. Any help would be
>appreciated.
See the docs on NSWindow's setReleasedWhenClosed:. Since it sounds like you're manually managing your overlay windows (i.e. not managing them with a window controller), send them a setReleasedWhenClosed message with a parameter of NO upon their creation. The framework will then not send them an additional release message when they receive a close message.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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