这个问题与这个有关,但更简单。[我想我可能已经接近完成这些愚蠢的问题,可以开始认真做事了:)]。
我有一个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;
该属性不应该将保留计数增加一吗?