Skip to content

Instantly share code, notes, and snippets.

@pita5
Created May 16, 2012 20:28
Show Gist options
  • Save pita5/2713702 to your computer and use it in GitHub Desktop.
Save pita5/2713702 to your computer and use it in GitHub Desktop.
- (id)init
{
static Data* data = nil;
if (data)
{
self = nil;
}
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
data = [super init];
});
return data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment