-
-
Save michaeleisel/a132c5b894ba8e36986f4526bfda86a8 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
-(id)retain | |
{ | |
NSIncrementExtraRefCount(self); | |
return self; | |
} | |
-(void)release | |
{ | |
if(NSDecrementExtraRefCountWasZero(self)) | |
{ | |
NSDeallocateObject(self); | |
} | |
} | |
-(id)autorelease | |
{ // Add the object to the autorelease pool | |
[NSAutoreleasePool addObject:self]; | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment