Re: Newbie: How to know whether an object is in autorelease pool
Re: Newbie: How to know whether an object is in autorelease pool
- Subject: Re: Newbie: How to know whether an object is in autorelease pool
- From: mmalc crawford <email@hidden>
- Date: Tue, 11 Dec 2007 21:43:55 -0800
On Dec 11, 2007, at 9:38 PM, norio wrote:
I know that class factory puts its instance into autorelease pool.
But I still don't know whether the other methods like
subdataWithRange of NSData is put in the pool or not.
You don't need to know whether an object is in an autorelease pool,
you just need to know whether you own it...
Carbon documentation describes who needs to release the returned
object, but not Cocoa's.
I'm always confused with this.
... Cocoa -- and the Cocoa documentation -- follows a simple set of
rules given here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html
>
Memory management is only commented on in the documentation if a
method does not follow these rules.
mmalc
_______________________________________________
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