On Mar 17, 2012, at 7:19 PM, Eeyore wrote:

> I believe you were also on the discussion of properties vs. direct ivar 
> access. This ties into that discussion. If you declare/define a property with:
> 
> @property (nonatomic, retain) NSDate* firstBadAccuracyTime;
> 
> If you are using ARC, the property would be
> 
> @property (nonatomic, strong) NSDate* firstBadAccuracyTime;

One thing to add is that if your property is a type of object for which there 
exists a mutable variant — NSString, NSArray, etc. — then you should use copy 
instead of retain/strong. For immutable objects, this will just do a retain 
anyway, so no harm no foul, but if someone passes, say, an NSMutableString to 
your property, you’d want to make an immutable copy of it so that the value 
wouldn’t change under your feet.

Charles
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to