Re: Release vs. autorelease
Re: Release vs. autorelease
- Subject: Re: Release vs. autorelease
- From: Robert Marini <email@hidden>
- Date: Mon, 12 Jan 2009 14:53:43 -0500
The memory management guides go into great detail on this subject.
Autoreleased objects have the trigger of a release delayed until the
autorelease pool is "drained." By explicitly releasing an object, you
are surrendering ownership of that object and, really, is there a good
reason to keep things in memory longer than they need to be?
-rob.
On Jan 12, 2009, at 2:37 PM, Mohan Parthasarathy wrote:
Hi,
In places other than dealloc where memory needs to be released (e.g,
reassigning pointer to objects), is there a difference in doing
autorelease
or release of the object in terms of perfomance etc. ? I can see
that the
memory is released immediately in one case whereas in the other it is
slightly delayed. Is there any other difference ? What is the right
thing to
do ?
thanks
mohan
_______________________________________________
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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