Skip to content

Instantly share code, notes, and snippets.

@akio0911
Created May 14, 2009 03:00
Show Gist options
  • Save akio0911/111448 to your computer and use it in GitHub Desktop.
Save akio0911/111448 to your computer and use it in GitHub Desktop.
#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