Re: Subclass observers on dealloc
Re: Subclass observers on dealloc
- Subject: Re: Subclass observers on dealloc
- From: "Julien Jalon" <email@hidden>
- Date: Thu, 1 Feb 2007 00:51:26 +0100
The problem is that removing key observers on self is too late at
dealloc time and you will likely see an error log for that in the
console...
--
Julien
On 1/31/07, Ken Tozier <email@hidden> wrote:
Hi
I have some sub classes of a custom NSView class that perform various
actions in response to changes in the view. Since the sub classes are
basically watching other parts of themselves, I'm wondering whether
it's necessary to call
[self removeObserver: self
forKeyPath: inProperty];
in the dealloc method. In this special case, will dealloc
automatically free up the observers or are observers stored somewhere
else like the application, or Objective C runtime?
TIA
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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