Automatic Reference Counting (ARC), an automatic reference count, is a compile-level feature of the development of a cocoa program for automatic memory management.
1: In Xcode 4.2, use a template to create a new project that will use the "Default" option for Arc features
2: For the project has been established can be selected, building settings, and then find objective C Automatic Reference counting (Cannot find, can search), set to No on the line.
Basic---of----arc theory
Arc works by automatically adding the code for the memory operation (Retain,release or autorelease) to the desired location when you compile the program. That is, the same memory management mechanism as the manual Reference counting (manual reference count) is used on the ground floor, but it simplifies programming because Xcode automatically helps you add code for memory operations at compile time.
ARC is enabled, and-fobjc-arc is required in the compilation options, but this is done by Xcode when creating the project template.
ARC is not supported in previous versions of XCode 4.2.
Also required for the operating system: Mac OS X v10.6 or v10.7 (64-bit applications), iOS4 or iOS5. Note: Mac OS X v10.6 and iOS4 do not support weak references (weak references, which later explain what weak references).
Xcode 4.2 provides a tool called "Convert to objective-c Automatic Reference counting", which, under Edit->convert menu, can help you automatically use manual The old code for Reference counting is converted to new code that uses arc (for example, removing calls to retain and release).