Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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.
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.