Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
These are the key points of Objective-C’s reference counting memory management system:
An object’s retain count keeps track of the number of other objects that are using the object. The retain count is frequently expressed as the number of owners an object has.
Objects are created with a retain count of one.
Sending an object a retain message increases its retain count by one.
Sending an object a release message reduces its retain count by one.
An autorelease message has no immediate effect, but it arranges to send a release message to its receiver at some future time.
When an object’s retain count reaches zero, the object is deallocated.