if object has property of type NSString
or NSNumber
, which is better, retain
or copy
?
I think these objects are immutable, (can not change state of object) so copy is better?
I see the example why copy is better that assign NSMutableString and change it, but there's no NSMutableNumber
. Then in the case of NSNumber
, I'd better use retain
to NSNumber
objects?
If copy
is better because NSString
and NSNumber
has small memory usage, how about if property is NSArray
type?
NSArray
type is also immutable, what about use copy in NSArray
properties?