• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Immediate memory release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Immediate memory release
      • From: "Clark Cox" <email@hidden>
  • Prev by Date: Re: FSCopyObjectASync Not Calling Callback In Cocoa
  • Next by Date: NSFormatter, NSTextfield and bindings
  • Previous by thread: Re: [SOLVED] Re: FSCopyObjectASync Not Calling Callback In Cocoa
  • Next by thread: Re: Immediate memory release
  • Index(es):
    • Date
    • Thread