【发布时间】:2010-06-20 23:15:38
【问题描述】:
这个问题和this one有关,但是比较简单。 [我想我可能已经接近完成这些愚蠢的问题,可以开始认真对待了:)]。
我有一个retain 属性并设置为这样:
UINavigationController *thing = [[UINavigationController alloc] initWithRootViewController:one];
// thing's retain count is one
navController = thing;
// thing's retain count is still one!
[thing release];
// now retain count is zero, which is wrong
我不明白为什么保留计数为零。 navController 定义为
@property (nonatomic, retain) UINavigationController *navController;
该属性不应该将保留计数加一吗?
【问题讨论】: