OC Memory Management Method:
- ARC Auto Reference count memory management mode.
- Reference count (reference count): similar to C + + shared referent, C + + is understood, when an intrinsic is applied, it will record the number of times the memory is used. When the number of times is 0 o'clock, the application will be released internally.
- Retain message: Make counter +1, change the method to return the object itself.
- Release message: Makes the counter-1 (does not mean that the object is disposed).
- Retaincount message: Gets the object's current reference counter value.
- Memory management.
- GC (garbageconnection): Similar to Java, in the course of program execution, the program is accurate to the internal garbage collection mechanism (iOS does not support this way).
- Managed by the programmer, but C uses pointers to do these things, and of course, the scenario used is a high memory requirement. Because, OC supports mixed with C.
OBJECT-C Memory Management