1

Possible Duplicate:
Atomic vs nonatomic properties

I am getting issues (errors) if I use @property(atomic,retain)NSString *myString like Expected a property attribute before "atomic".

I studied the difference between atomic and nonatomic from Stack Overflow question What's the difference between the atomic and nonatomic attributes?.

Where do I use atomic and nonatomic?

Community
  • 1
  • 1
Deepak
  • 439
  • 1
  • 5
  • 13

1 Answers1

8

Note that you cannot use the attribute atomic. There is either non-atomic or none (atomic is the default case). So you are looking for @property(retain) NSString *myString;.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
colincameron
  • 2,696
  • 4
  • 23
  • 46
  • And also for the most part you want to use "copy" and not "retain" @property (copy) NSString *myString; – John T Nov 07 '11 at 17:02