Re: Can an object observe itself?
Re: Can an object observe itself?
- Subject: Re: Can an object observe itself?
- From: William Jon Shipley <email@hidden>
- Date: Sat, 7 Mar 2009 15:51:39 -0800
Under Tiger and before, be sure to note the following caveat:
Bug Fix in Observing A Key Path Of Self
In Mac OS 10.3 and 10.4 there was a bug in which a debugging feature
of KVO made it difficult for an object to observe one of its own
values using a multicomponent key path: right before the class' -
dealloc method would be invoked, with the object still as an observer
of itself, Foundation would log something like "An instance 0x123456
of class MySelfObservingClass is being deallocated while key value
observers are still registered with it. Break on _NSKVODeallocateLog
to start debugging." Then if the object correctly removed itself as an
observer of itself, an exception would be thrown or a crash would
occur. This bug has been fixed in Mac OS 10.5. KVO still has a feature
in which it logs a warning if an object is being deallocated with
observers registered with it, but it now reliably ignores the object
itself as an observer.
_______________________________________________
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