How do I know if my program has ARC enabled or not?
问题 I create a project with ARC support using the Xcode project wizard. Compared with a program without ARC support, I did not notice any differences. Is there any hint that can tell me if my program supports ARC? I am using XCode 4.2.1 Build 4D502 回答1: You can use __has_feature , maybe logging whether the project has ARC in the console like this: #if __has_feature(objc_arc) // ARC is On NSLog(@"ARC on"); #else // ARC is Off NSLog(@"ARC off"); #endif Alternatively, instead of just logging whether