【发布时间】:2013-01-30 22:31:19
【问题描述】:
这是一个新编译器警告,仅在我将 XCode 更新到 4.6 时才出现。我的代码直接取自 Apple 的文档(顺便说一句,这是我的 iOS 6 代码)。
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error) {
[self setLastError:error];
if(localPlayer.authenticated){
警告--在此块中强捕获“localPlayer”可能会导致保留周期
【问题讨论】:
标签: ios xcode automatic-ref-counting game-center xcode4.6