Re: Retain cycle problem with bindings & NSWindowController
Re: Retain cycle problem with bindings & NSWindowController
- Subject: Re: Retain cycle problem with bindings & NSWindowController
- From: Allan Odgaard <email@hidden>
- Date: Wed, 9 Jun 2004 05:33:59 +0200
On 9. Jun 2004, at 4:49, Dennis C. De Mars wrote:
My solution was to send unbind: messages in the
windowWillClose:-notification.
OK, I can see that this would work. Do you have to send an unbind
message to each view object that has a binding?
At least all those which cause retainment of the involved parties. But
in my case I only had a single binding, so not much of a problem...
[...] If the window controller could be convinced to completely
release the window before it is itself dealloced then the cycle could
be broken but there is no way I know of to do this
You can send setWindow: with nil to the window controller.
This could be in a response to a 'window will close'-notification. But
there are cases where the window may re-open, and thus one needs to
have the class responsible for releasing the window controller also
perform this workaround.
Anyway, the best thing would be for Apple to fix the binding retain
situation so I would have to go through all this!
Indeed, there is probably a lot of applications out there which doesn't
work around this problem and thus leaks...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.