Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, you’ll learn about memory management in Objective-C. Objective-C keeps track of all the objects you create with a retain count, and when that count goes down to zero, Objective-C automatically deallocates the memory allocated to an object.
For example, say that you create two objects: