Should I assign or copy in the following case?
@interface Record: NSManagedObject {
@property (nonatomic, strong) NSString* location;
...
}
when assigning this property to something else:
@implementation AnyClass {
@property (nonatomic, strong) NSString* location;
...
-(void)copyValuesFromRecord:(Record *)last {
self.location = [last.location copy];
or
self.location = last.location
}
}
How do I reason about this? Does it matter one way or the other?
What if what I need to copy is an object of mine.