Finding Memory Leaks
Unlike optimizations, which are unnecessary for many applications, memory leaks are usually bugs that need to be fixed. Memory leaks and other memory errors are described in Chapter 5, “Cocoa Conventions.” Memory leaks can cause long running applications to crash, and they can reduce the performance of the operating system by consuming memory that is needed for other applications.
Apple explains how to efficiently use and debug memory at the following URL: http://developer.apple.com/techpubs/macosx/Essentials/Performance/VirtualMemory/Allocating__eing_Memory.html.
Apple provides developer tools for finding memory leaks. The easiest tool to use is ObjectAlloc, and can be used with any Cocoa application. Another tool is MallocDebug, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access