您的位置:首页 > Web前端

iOS常见问题之 cannot create __weak reference in file using manual reference counting

2016-10-24 14:14 591 查看
更新7.3后编译可能会出现这个错。

官方的回答在这里:https://forums.developer.apple.com/thread/38934

This issue behaves as intended based on the following: We are in the process of implementing weak references in all Objective-C language modes. Since “__weak” has historically been ignored in non-ARC (and non-GC) language modes, we’ve added this error to point out places where the semantics will change in the future. Please update your bug report to let us know if this is still an issue for you.

另外一个回答提到:

1 doesn’t apply to MRR, because you just don’t retain the variable anyway.

2 doesn’t apply to MRR either, because the runtime support is in GC and ARC, which you’re not using.

简而言之,现在的runtime和GC中会处理这种情况下的引用。不要再指明__weak了。所以删除掉就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐