On Feb 21, 2009, at 10:39 AM, Stuart Malin wrote:

So, I am curious as to why the default (retain) behavior of @synthesize does just this?

This is specified by atomicity, not 'retain'.
"the goal of the atomic implementation is to provide robust accessors"
(<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_6.html >)

And, is there a way to tell @synthesize to use one of the other approaches, or do I need to make such a property @dynamic and handle the setter/getter myself?

Use nonatomic.
"If you specify nonatomic, then a synthesized accessor for an object property simply returns the value directly." <http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_3.html >

mmalc

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to