Skip to content

Instantly share code, notes, and snippets.

@mdippery
Created September 14, 2010 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdippery/578568 to your computer and use it in GitHub Desktop.
Save mdippery/578568 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#import <stdio.h>
int main(int argc, char **argv)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *s1 = @"foo";
NSString *s2 = @"foo";
NSString *s3 = [[NSString alloc] initWithString:@"foo"];
printf("s1 = %p\n", s1);
printf("s2 = %p\n", s2);
printf("s3 = %p\n", s3);
[s3 release];
[pool release];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment