Re: when should my NSWindowController be released?
Re: when should my NSWindowController be released?
- Subject: Re: when should my NSWindowController be released?
- From: "Michael Ash" <email@hidden>
- Date: Fri, 12 Sep 2008 23:44:28 -0400
On Fri, Sep 12, 2008 at 9:02 PM, Jamie Hardt <email@hidden> wrote:
> On Sep 12, 2008, at 5:53 PM, Ken Thomases wrote:
>
>> 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.
>
>
> I think his question, and I've wondered about this too, is when do
> NSWindowControllers owned by an NSDcoument get deallocated? In the past
> I've put breakpoints on [NSWindowController dealloc] and have open and
> closed documents like crazy, and -dealloc never seems to get called:
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.
Mike
_______________________________________________
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