Le 18 oct. 2011 à 16:09, Michael Babin a écrit : > On Oct 18, 2011, at 8:42 AM, Jean-Daniel Dupas wrote: > >> >> Le 18 oct. 2011 à 14:00, Michael Babin a écrit : >> >>> 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. > > Which compiler/IDE version did you use? Wondering what the minimum > requirements are for both the tools and the binary created (your test results > are encouraging for 10.5 support for the binary itself). >
You need a modern version of clang (one that supports ARC I suppose), so I think Xcode 4.2 is required. Compiling using -mmacosx-version-min=10.5 generates simple msg_send, and compiling for modern target generates call to _objc_autoreleasePoolPush/Pop. -- Jean-Daniel _______________________________________________ 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