Re: No more warning about registered observers on dealloc with ARC?
Re: No more warning about registered observers on dealloc with ARC?
- Subject: Re: No more warning about registered observers on dealloc with ARC?
- From: Matt Neuburg <email@hidden>
- Date: Thu, 22 Dec 2011 09:19:03 -0800
On Thu, 22 Dec 2011 21:13:07 +0800, Roland King <email@hidden> said:
>You used to get a handy message logged to the console when an object with KVO registered on it was deallocated, but not in either of these two cases (and I can quite clearly demonstrate that the object was dealloc'ed with dangling KVO). Has that message been removed
No, I can easily generate it - all you have to do is register for KVO and let the object vanish at the end of the scope (which, under ARC, it will if it wasn't assigned to an ivar):
"An instance 0x6805020 of class MyClass1 was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:"
So presumably something else is going on here; perhaps you haven't quite gotten to the root of your problem yet. m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________
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