I want my struct to have cocoa objects when GC is set to required:
struct {
int pod;
#ifdef GC_REQUIRED
NSString *coc开发者_JAVA百科oa;
#endif
};
When garbage collection is enabled __OBJC_GC__ is defined, so you can check like this:
struct {
int pod;
#ifdef __OBJC_GC__
NSString *cocoa;
#endif
};
精彩评论