Next Page > Hide TOC

Introduction to Garbage Collection

Contents:

Who Should Read This Document?
Organization of This Document
See Also


In Mac OS X version 10.5, the Cocoa programming environment is enhanced with automatic memory management—commonly known as "garbage collection." The "traditional" system of memory management (using retain, release, and autorelease pools)—herein referred to as “reference counted”—coexists both for binary compatibility with existing programs as well as for those that choose to not make use of the new facility. Garbage collection is hence an opt-in system.

These documents describe the complete garbage collection system provided for Cocoa, the functionality provided, and some of the issues that arise if you adopt this technology.

Who Should Read This Document?

If you are developing applications using Cocoa, you should read at least “Garbage Collection for Cocoa Essentials” to gain an understanding of the garbage collection system. It is strongly recommended that you also read “Adopting Garbage Collection” and “Implementing a finalize Method.” You are expected to already understand the Objective-C language (see The Objective-C 2.0 Programming Language) and to have some familiarity with Cocoa.

Organization of This Document

The following articles explain the problems the garbage collection system addresses, the solutions it provides, its basic functionality, and common tasks you might perform:

See Also

The following documents provide information about related aspects of Cocoa and the Objective-C language.



Next Page > Hide TOC


© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-11-19)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.