So far, you’ve learned how to develop classes and create and initialize objects. Now is a great time to study the details of Objective-C memory management. Proper memory management is key to developing programs that perform both correctly and efficiently. In this chapter, you’ll look into how computer memory is allocated and released for Objective-C programs, the Objective-C memory model, and how to write programs that perform memory management properly.
The overall quality of a program is often directly related to its management of system resources. A computer’s operating system allocates a finite amount of main memory for program execution, and if a program attempts to use more memory than the amount allocated ...