(i) automatic memory management--arc
1> simple point is to let the compiler complete the heap space reference count of the addition and subtraction, automatic release, programmers no longer write retain and release methods
2>OC Automatic memory management is different from Java garbage collection, but rather in preprocessing is directly in the place should be kept add retain, where should be released to add release, is directly added code
3> arc outperforms Manual memory management in terms of efficiency
Limitations of 2.1.1 ARC
1> using arc may cause memory to be released prematurely because of code specifications
2> Import third-party libraries, or import old code that does not support arc
2.2 Tips for using arc
2.2.1 Commonly used two keyword-modified references
The __strong (strong Reference) default property, its decorated object pointer, points to which object, retain the object, and the object to which it is being left.
__weak (weak reference) its decorated object pointer, pointing to any object is not retain. The object pointed to by such a pointer may disappear at any time. If the object disappears, the pointer will automatically become nil.
In iOS programming, proxy objects use weak references.
OC for iOS Development (12)--memory management arc