NSLog(@"retain count 1 for show detail -- %d",[showDetail retainCount]);
ChecklistDetail *detail = [appDelegates.arrayForChecklistDetails objectAtIndex:[sender tag]];
self.showDetail = detail;
NSLog(@"retain count 2 for show detail -- %d",[showDetail retainCount]);
在这里,在上面的代码中,第一个 nslog 的输出是 "retain count 1 for show detail -- 0",这是正确的。但是,第二个 nslog 的输出如下 “retain count 2 for show detail -- 2”。
它的保留计数如何上升到 2?
如果可以的话,请帮助我....