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 6. More Objective-C > More on Memory Management

6.1. More on Memory Management

In Chapter 5, I walked you through Objective-C’s traditional memory management system, called reference counting. Each object has a retain count, which is ostensibly the number of other things that are currently using it. The good news is that you don’t need to constantly check the retain count. You need to keep track of only your own references; Cocoa will do the rest.


Warning:

You can call the retainCount method on any object, but don’t read too much into what it returns. It may not always reflect the exact number of retains and releases you have issued. Cocoa intervenes in certain cases.



  

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