Suppose that… for whatever reason, you need to target iOS 3.x. Yes. You need to build an app that should run on any possible device. Or say that… you simply don’t wanna use GCD.
What’s the alternative to write a singleton?
if(_instance = nil)
if(_instance == nil)
_instance = [[[self class] alloc] init];
This is a nice alternative to the GCD option. The first time the instance is created, you’ll suffer the lag caused by the @synchronized block. But after that. it’s just an if. No context switch. No whatsoever! REALLY performant!