Skip to content

Instantly share code, notes, and snippets.

@akio0911
Created May 22, 2009 07:44
Show Gist options
  • Save akio0911/116003 to your computer and use it in GitHub Desktop.
Save akio0911/116003 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
int main() {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSMutableArray *anArray = [NSMutableArray array];
[anArray addObject:[NSString stringWithString:@"red"]];
id anObject = [anArray objectAtIndex:0];
[anArray removeObjectAtIndex:0];
[anObject someMessage]; // crash !!!
[pool release];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment