• 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: Purpose of [NSAutoreleasePool drain] ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Purpose of [NSAutoreleasePool drain] ?


  • Subject: Re: Purpose of [NSAutoreleasePool drain] ?
  • From: email@hidden
  • Date: Thu, 16 Jun 2005 17:26:18 +0100 (BST)
  • Importance: Normal

> On Jun 16, 2005, at 7:59 AM, Nick Zitzmann wrote:
>> On Jun 16, 2005, at 6:38 AM, Jim Correia wrote:
>>
>>> If the docs are correct, the pool should not be reused after a drain.
>>> If they are wrong, a bug needs to be filed.
>>
>> I just ran a quick test and the docs are correct; -[NSAutoreleasePool
>> drain] and -[NSAutoreleasePool release] appear to do exactly the same
>> thing. So the better question is why was this method added?
>>
>> Nick Zitzmann
>> <http://www.chronosnet.com/>
>
> The method was added as an alternate name for possible future Garbage
> Collection purposes, as retain/release methods would become no-ops
> across the board.  The next question would then be: why would
> autorelease pools be interesting in a GC environment?  The answer is:
> the pool usage in existing source code (at the hypothetical future time
> of GC availability) might be useful as possible hints to the collector
> that "now would be a good time to do a little collecting".
>
> But GC isn't here yet (as of Tiger), and who knows if it will ever
> happen.  We don't expect people to be using -drain today, and I would
> advise against it (in case it takes on some new behaviors in the
> future).
>

Perhaps you should let the WebKit team know this. It was the few uses of
it in their source that got me interested in the first place.

Matt Gough

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Purpose of [NSAutoreleasePool drain] ? (From: Matt Gough <email@hidden>)
 >Re: Purpose of [NSAutoreleasePool drain] ? (From: Nicko van Someren <email@hidden>)
 >Re: Purpose of [NSAutoreleasePool drain] ? (From: Jim Correia <email@hidden>)
 >Re: Purpose of [NSAutoreleasePool drain] ? (From: Nick Zitzmann <email@hidden>)
 >Re: Purpose of [NSAutoreleasePool drain] ? (From: Chris Kane <email@hidden>)

  • Prev by Date: Re: Spotlight search speed problems?
  • Next by Date: Re: Purpose of [NSAutoreleasePool drain] ?
  • Previous by thread: Re: Purpose of [NSAutoreleasePool drain] ?
  • Next by thread: Re: Purpose of [NSAutoreleasePool drain] ?
  • Index(es):
    • Date
    • Thread