Chapter     4

Memory Management

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 ...

Get Pro Objective-C now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.