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 10. Accessors > Motivation

Motivation

Funnel access to an object’s properties through methods to hide implementation details and confine code related to memory management to those methods. Cocoa’s reference counted memory management provides a relatively simple pragmatic solution to the difficult problem of memory management, but patterns must be applied to use reference counting correctly, and accessors play a pivotal role in keeping memory management simple.

Enable use of higher level Cocoa technologies like Bindings, Key Value Coding, and key Value Observing with your custom classes.


  

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