【发布时间】:2014-01-29 18:49:07
【问题描述】:
我刚刚在我的项目中创建了一个新类,它是 UITableViewController 的子类,并注意到在方法 tableView:cellForRowAtIndexPath: 模板中,Apple 仍然提供了一个静态本地 NSString 用作单元格标识符。
我知道对于静态全局/局部变量,我们需要分配 nil,因为它被认为是强变量。
所以我问自己一个问题:我应该在哪里将 nil 分配给静态全局变量? 还有静态全局变量?
谢谢大家的回答
【问题讨论】:
标签: ios iphone memory static automatic-ref-counting