On the compilation unit, you can set the arc to be valid or invalid. For example, for each file you can choose to use or not to use arc, an application can be mixed with arc valid or invalid binary form.
The valid compilation method for setting arc is as follows: (Xcode4.2 start default setting for all file arcs)
* Use Clang (LLVM compiler) version 3.0 or later
* Specifies that the compiler property is "-fobjc-arc"
Setting arc is valid or invalid, generally two ways: uniform operation on all files, operation on some files.
1. Unified operation for all files
Requirements : Some programmers in order to better understand the memory management mechanism, deliberately specify the compiler as arc invalid.
action : Targets---Build Settings--Apple LLVM 7.1-language-objective C--and Objective-c Automatic Re Ference counting and set it to No.
2. Operation of partial files
requirements : Xcode often needs to import some third-party code files, if the project's compiler is specified as the arc mechanism, but the imported file is non-arc mechanism, when dealing with this situation, just tell the compiler to the foreign file by non-arc rules to compile, Other files are compiled according to ARC rules as usual.
action : Targets---Build phases--expand compile Sources and find non-arc mechanism files after double-clicking on compiler flags, and entering - Fno-objc-arc.
requirements : Xcode often needs to import some third-party code files, if the project's compiler is specified as a non-arc mechanism, but the imported file is the arc mechanism, when dealing with this situation, just tell the compiler to the external file by arc rules to compile, Other files are compiled as usual as non-arc rules.
action : Targets---Build phases--expand compile Sources and find non-arc mechanism files after double-clicking on compiler flags, and entering - Fobjc-arc.
Set arc valid or invalid