【发布时间】:2010-06-09 12:31:37
【问题描述】:
我是 iphone 内存管理的新手,对标准/正确性有疑问。
我的头文件声明:
IBOutlet UITabBarController *tabBarController;
@property (nonatomic, retain) UITabBarController *tabBarController;
在我的 init() 代码中,我正在执行以下操作:
self.tabBarController = [[UITabBarController alloc] init];
[tabBarController release];
NSLog(@"Retain count of tbc: %d",[tabBarController retainCount]);
将保留计数恢复为一。从标准化的角度来看,这是否正确?它对我来说只是看起来有点不同,但我还是新手。
谢谢
【问题讨论】:
标签: iphone properties standards