Created
January 9, 2012 04:47
-
-
Save dbrajkovic/1581185 to your computer and use it in GitHub Desktop.
Singlton
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
+ (id)allocWithZone:(NSZone *)zone { | |
return [[self sharedManager] retain]; | |
} | |
- (id)copyWithZone:(NSZone *)zone { | |
return self; | |
} | |
- (id)retain { | |
return self; | |
} | |
- (unsigned)retainCount { | |
return UINT_MAX; //denotes an object that cannot be released | |
} | |
- (void)release { | |
// never release | |
} | |
- (id)autorelease { | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment