So, the documentation says:
Why am I able to change the value of the NSString object in this code? I feel like I’m missing something.
#import <Foundation/NSString.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSAutoreleasePool.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSString *myStr = @"I can haz programburger";
myStr = @"banana";
printf("
%s
", [myStr UTF8String]); //Returns "banana"
[pool release];
return 0;
}