public
Last active

  • Download Gist
strings.m
Objective-C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#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;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.