1
@interface Event : NSManagedObject

@property (nonatomic, retain) NSDate * timeStamp;

@end

There is no compile error here. Why can use retain here? Should I replace it with strong?

Thanks.

fannheyward
  • 18,599
  • 12
  • 71
  • 109
  • possible duplicate http://stackoverflow.com/questions/7796476/property-definitions-with-arc-strong-or-retain – Lorenzo B Aug 28 '12 at 14:48

1 Answers1

2

strong is 100% synonymous with retain, so you don't need to replace it unless you want to. XCode generates it because, again, it's identical to strong.

That said, it would be nice if it used strong for consistency's sake. Apple's docs generally say if ARC == use strong, so it'd be nice if they did the same!

Tom Redman
  • 5,592
  • 4
  • 34
  • 42