Can you please answer my questions as is
in apple documentations its mentioned that NSstring is thread safety: Thread Safety Objects
When Apple says thread safety what do they mean:
is it: crash/ no crash or the correctness of the entire value (like you gave in the above example of 2 properties)?
if We look at the following property
@property (nonatomic, nonnull) NSString * familyName;
Without copy (I see no particular reason to set it as copy although the underline subclass is mutable, but lets assume we are not going to pass any mutable object to that property).
If the following is read and written from multiple threads can it crash? can it have non correct value ? (what do you mean non thread safety in that context)
From your last answer u described a case when it can crash (accessing a released object). Can you back up your answer with code snippet?
Can you provide a code that will crash when you read/ write to the above property from different threads?
Topic:
Programming Languages
SubTopic:
General
Tags: