What does the property “Nonatomic” mean?

后端 未结 9 806
野趣味
野趣味 2020-12-04 05:16

What does \"nonatomic\" mean in this code?

@property(nonatomic, retain) UITextField *theUsersName;

What is the difference between atomic an

9条回答
  •  囚心锁ツ
    2020-12-04 05:45

    In addition to what's already been said about threadsafeness, non-atomic properties are faster than atomic accessors. It's not something you usually need to worry about, but keep it in mind. Core Data generated properties are nonatomic partially for this reason.

提交回复
热议问题