After I thought that I've understood how they work, I tried this:
NSString *str1 = [NSString stringWithCString:"one"];
NSString *str2 = [NSString stringWithCString:"two"];
NSLog(@"str1: %x, %@", &str1, str1); //bfffd3cc, one
NSLog(@"str2: %x, %@", &str2, str2); //bfffd3c8, two
str1 = str2;
NSLog(@"str1: %x, %@", &str1, str1); //bfffd3cc, two
The value of an pointer (like str1, str2) is a memory address. When you go to that address, you reach the "area" in memory where the object is stored.
But: When I assign str2 to str1, str1 should have as an value the memory address of the same object that's referenced by str2, right? The strange thing here is, that the value of the pointer remains the same (bfffd3cc memory address), where the thing behind that address changes. that's actually completely unlogical to me ;) because I think that the memory address IS the object (or the home of the object in the memory brick, what ever). So I expected this:
NSString *str1 = [NSString stringWithCString:"one"];
NSString *str2 = [NSString stringWithCString:"two"];
NSLog(@"str1: %x, %@", &str1, str1); //bfffd3cc, one
NSLog(@"str2: %x, %@", &str2, str2); //bfffd3c8, two
str1 = str2;
NSLog(@"str1: %x, %@", &str1, str1); //bfffd3c8, two
Otherwise, I still didn't get the point. The relation between the value of the "pointer variable" and the "real value", lets say the object that's sitting behind that memory address.