Crash when creating the date formatter
Eddpt opened this issue · comments
I've seen some crashes coming into a production app through Crashlytics at this line:
df = [[NSDateFormatter alloc] init];
I believe they happen because if multiple threads race during the creation of the date formatter, the if
clause may not be enough to make sure everything is set up for all the remaining accesses, only a dispatch_once_t
is.
This can lead to an incomplete set up for the date formatter.
PR will follow.