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 13. Singleton > Motivation

Motivation

Define conventions for the creation of and access to an instance in cases where only one instance of a class should be created. Often singletons represent physical devices. At other times they represent virtual resources or other system properties that are singular and cannot or should not be duplicated. It is useful to have a one-to-one relationship between instances and the devices or concepts they represent.


  

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