Created
May 17, 2010 18:17
-
-
Save Shpigford/404049 to your computer and use it in GitHub Desktop.
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
static MySingletonClass *sharedGizmoManager = nil; | |
(MySingletonClass*)sharedManager{ | |
if (sharedSingletonManager == nil) { | |
sharedSingletonManager = [[super allocWithZone:NULL] init]; | |
} | |
return sharedGizmoManager; | |
} | |
(id)allocWithZone:(NSZone *)zone{ | |
return [[self sharedManager] retain]; | |
} | |
(id)copyWithZone:(NSZone *)zone{ | |
return self; | |
} | |
(id)retain{ | |
return self; | |
} | |
(NSUInteger)retainCount{ | |
return NSUIntegerMax; | |
} | |
(void)release{ | |
//do nothing | |
} | |
(id)autorelease{ | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment