Re: Trouble with property (copy) and retain counts
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