1

What's the best practice for atomicity of NSString? I have seen bug that creeps up when NSString is set to use nonatomic, but I don't remember in what situation.

Boon
  • 37,606
  • 51
  • 186
  • 296
  • 1
    http://stackoverflow.com/a/589392/420594 – drhr Jan 29 '14 at 23:11
  • possible duplicate of [What's the difference between the atomic and nonatomic attributes?](http://stackoverflow.com/questions/588866/whats-the-difference-between-the-atomic-and-nonatomic-attributes) – Leo Natan Jan 29 '14 at 23:21
  • 2
    It's not atomicity so much as identity you have to be worried about with value objects (i.e. using copy instead of retain or strong). Nonatomic properties only mess up reads during simultaneous writes. – CodaFi Jan 29 '14 at 23:23
  • Not a duplicate - I am asking for NSString specifically. I know the difference between the two! – Boon Jan 29 '14 at 23:39

0 Answers0