Post

Replies

Boosts

Views

Activity

Comment on dispatch_once weird behavior
+ (instancetype)shared { static dispatch_once_t onceToken; static OGAKeyManager *instance = nil; dispatch_once(&onceToken, ^{ instance = [[self alloc] init]; NSLog(@"%@", instance); // prints twice with a different memory address each time (one for each Framework) }); return instance; }
Sep ’23