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

Hour 13. Building on the Foundation > Foundation Paradigms and Policies

Foundation Paradigms and Policies

The common underpinnings of Foundation include implementation of policies and paradigms that are implemented across the other frameworks and in the code that you write. There are four sections of these paradigms and policies:

Mutability

Class clusters

Notifications

Garbage collection

GO TO HOUR 16, “MANAGING MEMORY AND RUNTIME OBJECTS,” p. 215 for a discussion of garbage collection.

Mutability

Many Foundation classes such as NSArray, NSSet, NSString, and NSData, have mutable and immutable variants. Typically, the mutable variant is a subclass of the immutable one; the mutable subclass is identified by its name. For example, NSMutableArray is the mutable variant of NSArray. As you can imagine, this can make it possible for the compiler and runtime to optimize performance for the immutable variants.


  

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