为什么我得到以下输出:
@property (nonatomic, retain) Player *thePlayer;
然后,以 .m 为单位:
NSLog(@"aPlayer retain count = %i",[aPlayer retainCount]);
thePlayer = aPlayer;
NSLog(@"thePlayer retain count = %i",[thePlayer retainCount]);
给出:
2012-09-18 21:52:36.787 Pocket Dungeons[56613:10a03] aPlayer retain count = 1
2012-09-18 21:52:36.788 Pocket Dungeons[56613:10a03] thePlayer retain count = 1