On Thu, Jul 2, 2009 at 4:33 PM, Dave DeLong<davedel...@me.com> wrote: > One way that I've seen used is to do this: > > BOOL isLeopardOrBetter = YES; > Class gcClass = NSClassFromString(@"NSGarbageCollector"); > if (gcClass == nil) { isLeopardOrBetter = NO; }
Don't do that. Check for the specific feature that you want to use. I.e. this code is fine if you want to check for the presence of NSGarbageCollector, however, that's exceeding unlikely, as you already know whether or not your code supports GC at compile time. -- Clark S. Cox III clarkc...@gmail.com _______________________________________________ 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