Capturing self strongly in this block is likely to lead to a retain cycle
来源:互联网 发布:Java医药管理系统 编辑:程序博客网 时间:2024/09/21 06:17
在block里引用self,xcode给出了这个warning:
Capturing self strongly in this block is likely to lead to a retain cycle
在SO上搜索了一番,好像和我的场景不太一样。最后我解决的办法是:
__block AddShopViewController *weakSelf = self;
然后在block里调用weakSelf:
[weakSelf clearFormAfterAppend];
0 0
- Capturing 'self' strongly in this block is likely to lead to a retain cycle
- capturing self strongly in this block is likely to lead to a retain cycle
- Capturing self strongly in this block is likely to lead to a retain cycle
- Capturing 'self' strongly in this block is likely to lead to a retain cycle
- Capturing 'self' strongly in this block is likely to lead to a retain cycle
- Capturing 'self' strongly in this block is likely to lead to a retain cycle [duplicate]
- Capturing 'self' strongly in this block is likely to lead to a retain cycle
- capturing self strongly in this block is likely to lead to a retain cycle
- Capturing 'self' strongly in this block is likely to lead to a retain cycle
- Capturing 'self' strongly in this block is likely to lead to a retain cycle [duplicate]
- Capturing 'self' strongly in this block is likely to lead to retain cycle 解决方案
- Capturing self strongly in this block is likely to lead to retain cycle解决方案
- Capturing self strongly in this block is likely to lead to retain cycle
- Capturing self strongly in this block is likely to lead to retain cycle的问题
- iOS之Block报错:capturing self strongly in this block is likely to lead to a retain cycle
- iOS之Block报错:capturing self strongly in this block is likely to lead to a retain cycle
- iOS--错误集锦--Capturing 'self' strongly in this block is likely to lead to a retain cycle
- 防止出现 Capturing 'self' strongly in this block is likely to lead to a retain cycle [duplicate]
- php发送smtp邮件
- Java SE 学习---继承与多态
- 字典树
- 224 灯光师小明
- c#应用程序初探
- Capturing self strongly in this block is likely to lead to a retain cycle
- 初探Cocos2dx与TexturePacker使用。
- 一种Android数据请求框架
- hdu 2066 一个人的旅行 最短路径
- 236 心急的C小加
- js 过滤非法字符,只输入数字,文本框长度限制
- 241 字母统计
- AE许可问题万能胶
- 有意思的long long类型移位