【发布时间】:2011-07-30 22:25:32
【问题描述】:
StackOverflow question "using static keyword in objective-c when defining a cached variable" 引用了 code from Example 4 of Xcode's TableViewSuite,它定义了 static NSDateFormatter 并调用 alloc,但从不调用 release。
不应该释放static 变量吗?如果是,它们应该在代码的哪里发布?如果没有,为什么不呢?
【问题讨论】:
标签: objective-c static release alloc