• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
      • From: Alex Zavatone <email@hidden>
References: 
 >iOS - the joy of observers and NSInternalInconsistancyException for KVO (From: Alex Zavatone <email@hidden>)
 >Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO (From: Jens Alfke <email@hidden>)
 >Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
  • Next by Date: Re: Set font on NSTextView that uses bindings?
  • Previous by thread: Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
  • Next by thread: Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO
  • Index(es):
    • Date
    • Thread