How to know whether a project uses ARC

There are 2 method to check whether a project is using ARC.
1. Select the project, open Build Settings. Look for Objective-C Automatic Reference Counting in the Apple LLVM Compile - Language section.

2. Try sth like this in code:
     [[[NSObject alloc] init] ]autorelease];

   If U get an error :ARC forbids explicit message send of 'autorelease'
   then, U R using ARC.
   

你可能感兴趣的:(project)