@property NSString *imageKey


#1

Why is the property imageKey declared as “copy” and not “strong”? Is this important?


#2

Back in the memory management/copy chapter - we use copy for classes that have mutable subclasses (NSArray, NSString, NSDictionary, etc.), so that a mutable instance couldn’t be provided as the image key and altered without the object owning the property’s knowledge.


#3

Thank you for a very fast reply! This resource is fantastic!


#4

Related to this, page 254 says “when this object” — referring to (NSString *)newUniqueIDString — “is passed to setImageKey:, BNRItem’s imageKey instance variable takes ownership of that object.”

Should I file that under errata since BNRItem be making a copy instead of taking ownership of this NSString?