Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Autorelease pool - was Beginners question regarding NSFileHandle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autorelease pool - was Beginners question regarding NSFileHandle



Hi,

The default autorelease pool is set up to release objects at the end of the event loop, for example, after the methods corresponding to a "push button" has been invoked.

Of course, if you have your own autorelease pool, it releases objects when you release it :

{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *array = [NSArray array];

...

[pool release]; // array receives a release at this time.
}



It is interseting, as an example, to have autorelease pool inside "large" loops.

Raphael

On Tuesday, August 7, 2001, at 02:22 PM, Roger Gilliar wrote:

Thanks for all the input, but I have some problems to figure out, when
exactly the autorelease pool is checked ? The docs say soemthing like "when
the application object get the 'focus'". But when exactly does this happen ?

Regards
Roger


References: 
 >Autorelease pool - was Beginners question regarding NSFileHandle (From: "Roger Gilliar" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.