• 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: release sent to deallocated instance under ARC .. how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: release sent to deallocated instance under ARC .. how?


  • Subject: Re: release sent to deallocated instance under ARC .. how?
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 24 Dec 2011 10:19:49 -0800

On Sat, 24 Dec 2011 13:35:07 +0800, Roland King <email@hidden> said:
object being dealloced. This line of code
>
>    return self.delegate == delegateArg
>
>caused self to get a retain/autorelease, resurrecting the object. The change to use the ivar directly fixed it

Using the ivar directly is also a way of using self (saying "delegate" is just a way of saying "self->delegate), so it isn't the mention of self that's the problem; it's probably that the delegate property has a custom getter doing some weird stuff. If so, that's a thing to beware of; getting sneaky with accessors is a way to trip oneself up later... I'd examine that getter if I were you. 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

  • Follow-Ups:
    • Re: release sent to deallocated instance under ARC .. how?
      • From: Roland King <email@hidden>
  • Prev by Date: Re: presentingViewController docs patently false
  • Next by Date: Re: presentingViewController docs patently false
  • Previous by thread: Re: release sent to deallocated instance under ARC .. how?
  • Next by thread: Re: release sent to deallocated instance under ARC .. how?
  • Index(es):
    • Date
    • Thread