Re: Determining OS at Runtime
Re: Determining OS at Runtime
- Subject: Re: Determining OS at Runtime
- From: Clark Cox <email@hidden>
- Date: Thu, 2 Jul 2009 17:46:44 -0700
On Thu, Jul 2, 2009 at 4:33 PM, Dave DeLong<email@hidden> 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
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden