If NSString
is mutable
then it gets copied
. If its not, then it is retained
If you will use copy
, a new copy for the string will be created hence different memory address too. Whereas, if you will use retain
then it will be in the same memory address only the retain counter will change.