加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – 为什么我会泄漏?

发布时间:2020-12-14 19:23:21 所属栏目:百科 来源:网络整理
导读:我有一个只包含这个的应用程序: - (void)viewDidLoad{ [super viewDidLoad]; //Authenticate Local GameCenter player [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) { [GKTurnBasedMatch loadMatchesWithCompletionH
我有一个只包含这个的应用程序:

- (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中的已知问题.

附:在iOS 6中不推荐使用authenticateWithCompletionHandler:方法,但它不负责泄漏.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读