2
@property ( atomic, assign ) Object *object1;
@property ( nonatomic, assign ) Object *object2;

What is default setting? I know that 'nonatomic' is default setting on iPhone programming.

On the Mac programming? Is that the same?

Thank you for reading this question.

MonsterK
  • 565
  • 1
  • 6
  • 12
  • What do you mean by "default"? If you don't specify `atomic` or `nonatomic`, the property will be assumed to be atomic regardless of platform. – kennytm Feb 17 '11 at 02:22
  • @Seongeon: next time, first check [the Objective-C documentation](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html#//apple_ref/doc/uid/TP30001163-CH17-SW28). – outis Feb 17 '11 at 02:26
  • @outis Ok. I'll do that. – MonsterK Feb 17 '11 at 02:34
  • possible duplicate of [Atomic vs nonatomic properties](http://stackoverflow.com/questions/588866/atomic-vs-nonatomic-properties) – bbum Feb 17 '11 at 03:28
  • Dupe of http://stackoverflow.com/questions/588866/atomic-vs-nonatomic-properties (the answer there covers significantly more ground, too). – bbum Feb 17 '11 at 03:28

1 Answers1

6

By default, declared property accessors are atomic in both iOS and Mac OS. There is no atomic keyword.