Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Part 4: Advanced Objective-C > Memory Management - Pg. 435

CHAPTER 24 Memory Management Garbage collection is a recent feature in Objective-C and, while this is a huge step in the right direction, it's not universally available. The alternative is traditional Objective-C managed memory, wherein your code takes responsibility for destroying objects. The principal reasons you'd choose to use managed memory instead of garbage collection are as follows: · The operating system or compiler doesn't support garbage collection (specifically, this is the case with the iPhone OS and older versions of Mac OS X). · You're working on a project that's already using managed memory. · The code must function in a managed memory environment (for example, a plug-in).