Yes, mutableCopy (and copy) is a deep copy.
see the following test code:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString *string1 = @"string1";
NSString *string2 = string1;
NSLog(@"Test 1(%p, %p): String 1: %@; String 2: %@", string1, string2, string1, string2);
string1 = nil;
NSLog(@"Test 2(%p, %p): String 1: %@; String 2: %@", string1, string2, string1, string2);
string1 = string2;
NSLog(@"Test 3(%p, %p): String 1: %@; String 2: %@", string1, string2, string1, string2);
string2 = [string1 mutableCopy];
NSLog(@"Test 4(%p, %p): String 1: %@; String 2: %@", string1, string2, string1, string2);
}
It produces the following output. You can see the memory location is the same when string2 is assigned to string1. In test 4, after the mutableCopy, the memory location is changed.
2015-04-30 11:07:30.359 TestStuff[9425:2555886] Test 1(0x103021068, 0x103021068): String 1: string1; String 2: string1
2015-04-30 11:07:30.359 TestStuff[9425:2555886] Test 2(0x0, 0x103021068): String 1: (null); String 2: string1
2015-04-30 11:07:30.359 TestStuff[9425:2555886] Test 3(0x103021068, 0x103021068): String 1: string1; String 2: string1
2015-04-30 11:07:30.359 TestStuff[9425:2555886] Test 4(0x103021068, 0x7f9a23d71b30): String 1: string1; String 2: string1