iOS - the joy of observers and NSInternalInconsistancyException for KVO
iOS - the joy of observers and NSInternalInconsistancyException for KVO
- Subject: iOS - the joy of observers and NSInternalInconsistancyException for KVO
- From: Alex Zavatone <email@hidden>
- Date: Thu, 19 May 2016 10:51:51 -0400
I'm having fun with async NSURLSession downloads but running into objects deleting themselves in error cases while still being observed, resulting in the lovely NSInternalInconsistancyException.
Is there a means to have an object know when it's being observed so that it will refuse to nuke itself in this condition?
Sure, I can set a breakpoint on dealloc to see when this is happening, but I'm sure you lots of people have already run into this condition and have already figured out how to handle it.
Is there any safer KVO technique to prevent or detect the dreaded "An instance of xxxxxx was deallocated while key value observers were still registered with it"?
Thanks in advance,
Alex Zavatone
_______________________________________________
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