Created
January 14, 2010 01:34
-
-
Save aufflick/276769 to your computer and use it in GitHub Desktop.
This file contains 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
#import <objc/objc-class.h> | |
@implementation NSObject (override) | |
- (void) releaseLog | |
{ | |
fprintf(stderr, "release: %s\n", class_getName([self class])); | |
// now call the original implementation (swapped with releaseLog) | |
// to actually effect the release | |
[self releaseLog]; | |
} | |
- (id) autoreleaseLog | |
{ | |
fprintf(stderr, "autorelease: %s\n", class_getName([self class])); | |
// now call the original implementation (swapped with autoreleaseLog) | |
return [self autoreleaseLog]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment