开发者

Is there conditional statements to exclude code when compiling with GC disabled?

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 
};
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜