Skip to content

Instantly share code, notes, and snippets.

@mdippery mdippery/strings.m
Created Sep 14, 2010

What would you like to do?
#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
You can’t perform that action at this time.