通过__has_feature(objc_arc)判断当前是否为ARC的内存管理模式:
#if __has_feature(objc_arc) //ARC
NSLog(@"ARC");
#else
NSLog(@"MRC");
#endif
通过__has_feature(objc_arc)判断当前是否为ARC的内存管理模式:
#if __has_feature(objc_arc) //ARC
NSLog(@"ARC");
#else
NSLog(@"MRC");
#endif