Created
December 8, 2013 11:21
-
-
Save ariok/7856111 to your computer and use it in GitHub Desktop.
Basic Singleton pattern implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (AnythingManager*)sharedAnythingManager{ | |
static AnythingManager *anythingManager; | |
static dispatch_once_t token; | |
dispatch_once(&token, ^{ | |
anythingManager = [[AnythingManager alloc]init]; | |
}); | |
return anythingManager; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment