最後の行が-1と出力される理由を誰かが説明できますか?これは、コピーがNSMutableStringで呼び出されたときに発生します。不変のコピーが返される必要があるため、strFourのreturnCountは1になると思います。
NSMutableString *str =[NSMutableString stringWithString:@"hi"];
NSLog(@"new instantiated variable has a retain cout:");
NSLog(@"%d",[str retainCount]); //1, str is a pointer, its value is a memory address
NSMutableString *strFour =[str copy]; //receiver str is mutable, copy returns an immutable
NSLog(@"%d",[strFour retainCount]); ////strFour s retain count should be 1, but it had a retain count of -1
どうもありがとう。