-
字符串常量引用计数 -1
//引用计数为-1 NSString *test1 = @""; NSString *test2 = [[NSString alloc]init]; NSString *test3 = [NSString stringWithFormat:@"test"];
字符串变量引用计数 符合NSObject的引用计数规则
//引用计数为1
NSString *test4 = [NSString stringWithString:[NSString stringWithFormat:@"test-%d",4]];