Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
- Subject: Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
- From: Jens Alfke <email@hidden>
- Date: Thu, 19 May 2016 11:10:59 -0700
> On May 19, 2016, at 9:54 AM, Alex Zavatone <email@hidden> wrote:
>
> OK, fair enough. Looks like I'll have build a little weak referenced dealy that subclasses dealloc and stops if it detects any observers.
Holy crap, don’t do that. First, you can’t stop a dealloc. Instead you’d have to override retain and release, which is very tricky and will break ARC. Second, needing to do this is a sure sign that You’re Doing It Wrong — it’s like one of those images captioned FAIL where someone’s done some crime against nature using duct tape.
What is the problem exactly? Who is observing what?
—Jens
_______________________________________________
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