Re: How is this an "incorrect decrement of a reference count"?
Re: How is this an "incorrect decrement of a reference count"?
- Subject: Re: How is this an "incorrect decrement of a reference count"?
- From: G S <email@hidden>
- Date: Mon, 19 Mar 2012 15:58:43 -0700
On Mon, Mar 19, 2012 at 3:47 PM, Roland King <email@hidden> wrote:
> And do you now understand why you are releasing the wrong thing?
>
Well, I understand why my code just happens to be releasing the right
thing, but easily couldn't. Obviously the getter might be coded to return
anything, including a wholly different object.
Thanks for all the feedback. I've changed all the offending code to use
temporary pointers for the assignment and release. The analyzer's happy.
I will convert to ARC when I have time, but I'm using a couple of
open-source libraries that I don't want to convert right now.
_______________________________________________
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