Chapter 17. Memory Management

We have focused on the topic of memory management throughout this book. You should understand by now when you are responsible for releasing objects and when you are not. Even though the examples in this book have all been small, we have emphasized the importance of paying attention to memory management, to teach good programming practice and to develop leak-free programs.

Depending on the type of application you’re writing, judicious use of memory can be critical. For example, if you’re writing an interactive drawing application that creates many objects during the execution of the program, you must take care that your program doesn’t continue to consume more memory resources as it runs. In such cases, it becomes ...

Get Programming in Objective-C, Third Edition now with O’Reilly online learning.

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