tempString = myString;
myString, tempString
, "Never Hard"
. , .
, - "But if I try to alloc and init the tempString, it will bring an error."
1
- . tempString
- . -
myString -> MemoryLocation_1 that has "Never Hard"
tempString -> MemoryLocation_2 and the location it is pointing to isn't intialized with any value.
Now, with this statement -
tempString = myString;
Both myString and tempString -> MemoryLocation_1 that has "Never Hard"
MemoryLocation_2, . , . , . , .