10
Objective-C GCD dispatch_once kullanarak singleton oluşturun
İOS 4.0 veya üstünü hedefleyebiliyorsanız GCD kullanmak, Objective-C (thread safe) içinde singleton oluşturmanın en iyi yolu mudur? + (instancetype)sharedInstance { static dispatch_once_t once; static id sharedInstance; dispatch_once(&once, ^{ sharedInstance = [[self alloc] init]; }); return sharedInstance; }