Skip to content

Instantly share code, notes, and snippets.

@collinprice
Created February 11, 2013 16:03
Show Gist options
  • Save collinprice/4755358 to your computer and use it in GitHub Desktop.
Save collinprice/4755358 to your computer and use it in GitHub Desktop.
+(id)sharedInstance {
static dispatch_once_t p = 0;
__strong static id _sharedObject = nil;
dispatch_once(&p, ^{
_sharedObject = [[self alloc] init];
});
return _sharedObject;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment