Objective-C Memory Management

Every object that is derived from NSObject has the ability to be managed by retain counting. When an object is created (alloc) the system will allocate memory for the object and set a retain count to 1. The count can be incremented when a new instance of this object exist (assignment for example) and decrement when an object instance is released. Once the retain count is going to zero the object will be destructed and the memory getsĀ freed.Ā This post is Continue reading Objective-C Memory Management