Re: Unregistering KVO observers
Re: Unregistering KVO observers
- Subject: Re: Unregistering KVO observers
- From: Hal Mueller <email@hidden>
- Date: Thu, 17 Apr 2008 21:01:41 -0700
Look at Malcolm Crawford's Graphics Bindings example, which contains
among other things two methods on GraphicsView to start and stop
observation when an object of that class is created or destroyed.
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
I use -removeObserver:forKeyPath: for each of the keypath
notifications I have requested, and then I count on the superclass's
dealloc method to take care of its own keypath notifications. You can
also use -removeObserver: but that seems like a blunt instrument to
me, especially since I don't know what the superclass is counting on.
It would help to see your dealloc and close methods, especially if you
think you're having trouble with a notification that you didn't
register for.
Hal
_______________________________________________
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