Created
May 14, 2009 03:00
-
-
Save akio0911/111448 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
#import <Foundation/Foundation.h> | |
@interface Foo : NSObject | |
@end | |
@implementation Foo | |
- (void)dealloc { | |
NSLog(@"%s called", __func__); | |
[super dealloc]; | |
} | |
@end | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
[[[Foo alloc] init] autorelease]; | |
[[[Foo alloc] init] autorelease]; | |
NSLog(@"pool release..."); | |
[pool release]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment