Re: releasing an object
Re: releasing an object
- Subject: Re: releasing an object
- From: Graham Cox <email@hidden>
- Date: Sat, 10 Oct 2009 21:36:41 +1100
On 10/10/2009, at 9:31 PM, Nick Rogers wrote:
Shall I get its retainCount and then release it that many times?
For heavens' sake, NO!
Ignore retain counts. They are not reliable evidence of anything you
can use. Instead, just follow the rules:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html
I'm doing alloc and initWithDictionary to get an instance of Volume.
I have to do [selectedPTVolume retain]; when allocing to get it to
work properly.
Show your code. This sounds wrong, but without seeing the code it
can't really be inferred from the description.
--Graham
_______________________________________________
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