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"であり、これは正しいです。ただし、2 番目の nslog の出力は、 「retain count 2 for show detail -- 2」のようになります。
保持カウントが 2 になるのはなぜですか?
できれば助けてください....