NSWindowController deallocation does not remove key value observing
NSWindowController deallocation does not remove key value observing
- Subject: NSWindowController deallocation does not remove key value observing
- From: Guy Meyer <email@hidden>
- Date: Sat, 03 Jan 2009 02:39:21 +0200
Hi
I have got an NSWindowController subclass which loads a nib window
with few NSControls. These NSControls are bound to some other objects.
When the window is closed, the NSWindowController is being deallocated
and all it is NSControls sub views are also being deallocated (as it
should be), however these deallocated objects do not remove their key
value observers from the observed object.
When the observed object issues "infoForBinding" selector you can see
there are still references to the deallocated objects.
Is there any solution to the above, beside hardwiring all those
controls and issuing "unbind" prior to the deallocation ?
Issuing [[NSNotificationCenter defaultCenter] removeObserver:self]
from the NSWindowController prior to deallocation deosn't make a
difference.
Thanks
Guy
_______________________________________________
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