Re: Immediate memory release
Re: Immediate memory release
- Subject: Re: Immediate memory release
- From: "Paul Bailey" <email@hidden>
- Date: Thu, 1 May 2008 10:05:44 +0100
The class documentation for NSAutoreleasePool notes that release is a no-op
on garbage-collected environments, and one should use drain to give the
garbage collector a hint to do its job (that's my limited understanding).
It notes that drains behaves the same as release in a memory managed
environment, so it's safe to use in both circumstances.
Basically, if there's a chance your code might be garbage-collected, use
drain.
As for new, not sure...
Cheers,
Paul
On Thu, May 1, 2008 at 6:00 AM, j o a r <email@hidden> wrote:
>
> On Apr 30, 2008, at 7:27 PM, Jens Alfke wrote:
>
> I also changed the pool calls to the current recommended names: +new and
> > -drain.
> >
>
>
> Can you point me to where the official documentation recommends the use of
> +new over +alloc-init?
>
> Thanks,
>
> j o a r
>
>
>
> _______________________________________________
>
> 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
>
_______________________________________________
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