I have an object with a property:
@interface Car
@property(strong) NSLicensePlate *licensePlate;
@end
I use the property in a method:
When you define properties, you can set them as atomic
(the default) or nonatomic
.
Since you're using the atomic
default, you should be fine about thread safety, but that also depends on how you implemented frobnicate
, setLicensePlate:
and cleanLicensePlate
.
Please refer to this question to get more details about atomic
vs nonatomic
: What's the difference between the atomic and nonatomic attributes?