yel*_*low 2 warnings objective-c automatic-ref-counting afnetworking
我AFNetworking在我的项目中使用,但它有2个警告:
AFNetworking
完整的警告字符串是:
/AFNetworking/AFHTTPClient.m:575:38: Capturing 'operation' strongly in this block is likely to lead to a retain cycle
Kei*_*ley 5
这里有两个其他 问题,有关这个问题很好回答.这是在块中使用强变量的问题.要在使用ARC时抵消这一点,您必须使用__weak声明.我建议你阅读第一个链接,特别是了解更多.
__weak
编辑
起初我没有意识到你在AFNetworking的代码中看到了这个警告.使用最新版本的AFNetworking我没有看到此警告.
归档时间:
12 年,11 月 前
查看次数:
2651 次
最近记录: