Re: release sent to deallocated instance under ARC .. how?
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