• 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: Trouble with property (copy) and retain counts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with property (copy) and retain counts


  • Subject: Re: Trouble with property (copy) and retain counts
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 5 May 2009 17:01:34 -0600


On May 5, 2009, at 4:54 PM, Malayil George wrote:

If the getter is always incrementing the reference count by 1, I would
expect the reference count at each NSLog, where I am using the getter, to be
2 above the previous value. This doesn't seem to be the case for line 3 of
the output where it has gone up by only 1. In subsequent NSLog() statements
it seems to go up by 2.


This behavior is seen again after the drain. Am I missing something?


Yes - don't worry about retain counts unless Instruments or the leaks tool is telling you that you have a memory leak. Do you know for a fact that you have a memory leak?

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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: Trouble with property (copy) and retain counts
      • From: Malayil George <email@hidden>
References: 
 >Trouble with property (copy) and retain counts (From: Malayil George <email@hidden>)
 >Re: Trouble with property (copy) and retain counts (From: Malayil George <email@hidden>)

  • Prev by Date: Re: Trouble with property (copy) and retain counts
  • Next by Date: Re: Trouble with property (copy) and retain counts
  • Previous by thread: Re: Trouble with property (copy) and retain counts
  • Next by thread: Re: Trouble with property (copy) and retain counts
  • Index(es):
    • Date
    • Thread