Memory management of static consts in Objective-C

99 views Asked by At

I was watching the F8-2016 Building iOS Tooling at Facebook Scale video, when I've noticed an interesting code part at 7:01.

Facebook defined a static constant in Objective-C this way:

static __unsafe_unretained NSString * const kAuthorKey = @"AUTHOR";

Up to now, I declared my static constants the same way, but without the __unsafe_unretained. Without this modifier, the constant will be strong, but since it exists always during the application run, it doesn't matter if it is strong or __unsafe_unretained.

Am I missing something? Do Facebook has any reason to use __unsafe_unretained?

0

There are 0 answers