• 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: How is this an "incorrect decrement of a reference count"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How is this an "incorrect decrement of a reference count"?
      • From: Greg Parker <email@hidden>
    • Re: How is this an "incorrect decrement of a reference count"?
      • From: Charles Srstka <email@hidden>
References: 
 >How is this an "incorrect decrement of a reference count"? (From: G S <email@hidden>)
 >Re: How is this an "incorrect decrement of a reference count"? (From: Roland King <email@hidden>)
 >Re: How is this an "incorrect decrement of a reference count"? (From: G S <email@hidden>)
 >Re: How is this an "incorrect decrement of a reference count"? (From: Roland King <email@hidden>)

  • Prev by Date: Re: How is this an "incorrect decrement of a reference count"?
  • Next by Date: Re: How to support larger NSView hierarchy?
  • Previous by thread: Re: How is this an "incorrect decrement of a reference count"?
  • Next by thread: Re: How is this an "incorrect decrement of a reference count"?
  • Index(es):
    • Date
    • Thread