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 22. Flyweight > Motivation

Motivation

Within Cocoa, flyweights are primarily used for the following three reasons:

  • Flyweights encapsulate nonobject data so that the data can be used in contexts where objects are required.

  • Flyweights reduce storage requirements when a large number of instances are needed.

  • Flyweights act as stand-ins for other objects.


  

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