• 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: AutoreleasePool mechanics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AutoreleasePool mechanics


  • Subject: Re: AutoreleasePool mechanics
  • From: email@hidden (mikevannorsdel)
  • Date: Thu, 20 Dec 2001 09:31:26 -0700

Thanks. This is about what I thought, but I wanted to double check so I
wasn't leaving objects here and there when they weren't needed.


On 12/20/01 9:06 AM, "Ondra Cada" <email@hidden> wrote:

> I am quite positive this is documented as well (though I don't just now
> remember where exactly): for each event loop a new pool is created (and
> destroyed when then even loop ends). Something like
>
> while (evt=lowLevelServiceToGetTheNextEvent()) {
> id pool=[[NSAutoreleasePool alloc] init];
> [NSApp sendEvent:evt];
> [pool relese];
> }
>
> though the actual implementation would be naturally more complicated.
>
> So, unless you create a big pile of objects inside one event, there's no fear.


References: 
 >Re: AutoreleasePool mechanics (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: AutoreleasePool mechanics
  • Next by Date: NSRunCriticalAlertPanel doesn't behave as I expected.
  • Previous by thread: Re: AutoreleasePool mechanics
  • Next by thread: Crash, and crash again
  • Index(es):
    • Date
    • Thread