Objective-C-Optimized-Singleton icon indicating copy to clipboard operation
Objective-C-Optimized-Singleton copied to clipboard

How does this compare to the dispatch_once approach?

Open victor opened this issue 12 years ago • 0 comments

I’ve seen elsewhere implementations of a singleton that use dispatch_once to initialize the static variable. How does that compare with the method swizzling approach, and, can they be combined, or there is no point?

TIA Victor

victor avatar Mar 10 '12 16:03 victor