【发布时间】:2025-12-02 02:00:02
【问题描述】:
以下代码来自 Apple 的 GKRocket iPhone 演示应用:
- (void) peerListDidChange:(SessionManager *)session;
{
NSArray *tempList = peerList;
peerList = [session.peerList copy];
[tempList release];
[self.tableView reloadData];
}
我是目标 c 的新手,想知道 tempList 是否真的需要发布?我的直觉告诉我不是因为它没有保留指针。也许我没有看到全貌。
如果确实需要发布,请有更多经验的人解释原因吗?
谢谢!
【问题讨论】:
标签: iphone objective-c cocoa-touch