• 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: Roland King <email@hidden>
  • Date: Fri, 20 May 2016 07:49:51 +0800

> On 20 May 2016, at 07:04, Roland King <email@hidden> wrote:
>
>
> Reading the original post he already has the warning about an object being deallocated whilst still having observers attached to it.
>
> This is simply a case of putting a breakpoint on dealloc and working out why the object is being deallocated before you’ve gone through the observation removal code you have.

.. and if you want a condition you can put on a conditional breakpoint inside dealloc (or swift equivalent), checking self.observationInfo != nil may help to get the right dealloc. And that object, even though it’s actually opaque and internal and not-to-be-used, when printed will reveal some hints about who is still observing you .. at least in objC, I’ve never got the right commands to make LLDB use the objC print to show it.

Just for clarity - I’m not suggesting using observationInfo to ‘prevent dealloc’, which you can’t do anyway and even if you could would be somewhere just the other side of insane, just to help filter out during debugging which dealloc to break on.
_______________________________________________

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


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>)
 >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>)
 >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: Roland King <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 13, Issue 224
  • Next by Date: Re: Cocoa-dev Digest, Vol 13, Issue 224
  • 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