Let's say I have a class called SomeClass with a string property name:
@interface SomeClass : NSObject
{
NSString* name;
}
@property (nonatomic, retain) NSString* name;
@end
I understand that name may be assigned a NSMutableString in which case this may lead to errant behavior.
- For strings in general, is it always a good idea to use the
copyattribute instead ofretain? - Is a "copied" property in any way less efficient than such a "retain-ed" property?