Free Trial

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


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 15. Garbage Collection > Garbage Collection: The Practice

Garbage Collection: The Practice

The actual implementation of Objective-C’s garbage collector is more sophisticated than the simple mark and sweep garbage collector described in the previous section. It is an example of a generational garbage collector.

In most programs, allocated objects are either temporary or they last for an extended duration. A generational collector guesses that the most recently allocated memory is the memory most likely to be garbage, and examines that memory first.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial