我有一个仅包含以下内容的应用程序:

- (void)viewDidLoad
{
    [super viewDidLoad];

    //Authenticate Local GameCenter player
    [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error)
     {
         [GKTurnBasedMatch loadMatchesWithCompletionHandler:^(NSArray *matches, NSError *error)
          {

          }];
     }];
}

马上,我漏了很多水。难道我做错了什么?我使用ARC。

最佳答案

loadMatchesWithCompletionHandler:GKTurnBasedMatch方法中的泄漏是iOS 6.0.1中的一个已知问题which has been fixed in iOS 6.1

P.S.在iOS 6中不推荐使用authenticateWithCompletionHandler:方法,但它对泄漏不承担任何责任。

10-07 19:54
查看更多