Search code examples
iosobjective-cxcodeinstrumentsgamekit

Why do I get a leak?


I have an app that only contains this:

- (void)viewDidLoad
{
    [super viewDidLoad];

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

          }];
     }];
}

And right away, I get a ton of leaks. Am I doing something wrong? I use ARC.

enter image description here


Solution

  • The leak in loadMatchesWithCompletionHandler: method of GKTurnBasedMatch was a known issue in iOS 6.0.1, which has been fixed in iOS 6.1.

    P.S. The authenticateWithCompletionHandler: method is deprecated in iOS 6, but it is not responsible for the leak.