On Oct 18, 2011, at 6:42 AM, Jean-Daniel Dupas wrote:
> Le 18 oct. 2011 à 14:00, Michael Babin a écrit :
>> On Oct 17, 2011, at 2:49 PM, Greg Parker wrote:
>>> @autoreleasepool also works without ARC. It's faster than 
>>> NSAutoreleasePool. Use it.
>> 
>> What are the minimum requirements for using @autoreleasepool? The same as 
>> ARC, even when not used with ARC (Xcode 4.2 for Mac OS X v10.6 and v10.7 
>> (64-bit applications) and for iOS 4 and iOS 5)?
> 
> I tried to compile a program using @autoreleasepool and targeting 10.5, and 
> the compiler was smart enough to not call the new runtime functions, but 
> instead generate old [[NSAutoreleasPool alloc] init] and [pool drain] 
> messages.
> 
> So I guess it should works for all supported platforms.

That's right. The only requirement is the LLVM Compiler (aka clang). If your 
deployment target is too old for the new optimized autorelease pool 
implementation, the compiler will call the traditional NSAutoreleasePool 
methods instead.


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to