Re: autorelease pool
Re: autorelease pool
- Subject: Re: autorelease pool
- From: Gregory Weston <email@hidden>
- Date: Tue, 23 Oct 2007 15:52:15 -0400
Erfan Aleemullah wrote:
Yes, I am trying to figure out whether or not I need to use the
release pool
and was throwing the above code out as an example - what I wanted
to know is
**do I need the autorelease pool if the retain count is 1 after the
command
[myObject release]; *
I need to deallocate memory in my program and release alone isn't
taking the
retain count to 0
Ignore the retain count. It's an implementation detail that's not
reliably useful for what you're trying to get out of it.
Adding an autorelease pool isn't going to do anything magic, and the
only way you should ever _need_ to add one (although they can
optionally be introduced to improve resource utilization) is if you
see a logged message that an object was autoreleased without a pool
in place.
_______________________________________________
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