I have a simple question. If I am declaring NSString (ref type) as shown below:
NSString *johnsMoney = @\"200\";
NSString *marysMoney = johnsMoney;
@"200" is objective-c notation for an NSString object. It will have it's own memory space and johnsmoney will point to it. So, marysmoney never really points to johnsmoney.
What actually happens is this...
Johns Money 200 // pointer 1
Marys Money 200 // pointer 1
Johns Money 100 // pointer 2
Marys Money 200 // pointer 1
johnsmoney points to @"200". marysmoney also points to @"200". When johnsmoney gets assigned @"100", johnsmoney points to @"100". While marysmoney still points to @"200".