Re: NSWindowController with NSObjectController doesn't dealloc
Re: NSWindowController with NSObjectController doesn't dealloc
- Subject: Re: NSWindowController with NSObjectController doesn't dealloc
- From: Frédéric Testuz <email@hidden>
- Date: Mon, 11 Oct 2004 19:49:14 +0200
Le 11 oct. 04, à 18:51, Peter Schmidt a écrit :
Hello List,
I have subclassed an NSWindowcontroller class, wich is initialized by
the [myController initWithNibName: @"MyWindow"] Method. In the
Nib-File is an NSArrayController, wich is bound to some UI-Elements.
If I send the WindowController the close-Message my dealloc-Method
won't be called. If I remove the ArrayController it works perfect. It
seems the NSArrayController is still bound to the contentArray. All
bindings are made in the IB. There is no Outlet to the
NSArrayController.
What do I wrong?
Nothing. It's the way the bindings are implemented. It was already
discuss. If the file's owner is a windowController, you must send an
unbind message to all the controllers who are bind to the
windowController.
Check that the windowController is the delegate of the window. In the
windowController implement :
- (void)windowWillClose:(NSNotification *)notification
{
[theArrayController unbind:@"contentArray"];
}
I think it's a circular retain case.
Greeting,
--
Frédéric Testuz
<
mailto:email@hidden>
_______________________________________________
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