Capturing self strongly in this block is likely to lead to retain cycle解决方案
来源:互联网 发布:手机自动开启移动网络 编辑:程序博客网 时间:2024/06/08 19:51
Capturing self strongly in this block is likely to lead to retain cycle
又是一个坑爹问题,却是可能常会遇到的,这个错误的意思:
block 是代码块的意思。甲里引用乙,乙里引用甲,就会导致 “retain cycle” -- “形成怪圈”的错误。
解决方案:一句话搞定。
__unsafe_unretained typeof(self) vc = self;
解决后的例子:
然后,你会惊奇的发现,解决了。。。
请关注:http://blog.csdn.net/u011189158/
跟我一起学习iOS吧。
0 0
- 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 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 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 retain cycle的问题
- Capturing 'self' strongly in this block is likely to lead to a retain cycle [duplicate]
- 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]
- Android开发入门第一章:在Windows下搭建Android开发环境
- MFC中让自定义的类能响应消息
- [Cougaar]Cougaar快速开始指导(Cougaar Quick Start Guide)
- 如何阻止文件被iTunes和iCloud同步 How do I prevent files from being backed up to iCloud and iTunes?
- boost.circular_buffer简介
- Capturing self strongly in this block is likely to lead to retain cycle解决方案
- c++的一些开源库(待补充修改)
- 取出视频播放某时刻的图片
- Windows下的OpenGL编程进行简单介绍
- 反三角函数在matlab中怎样定义
- linux系统替换新内核(编译安装替换与打包替换)
- 安卓问题报告小记(二):Eclipse导入项目:No projects are found to import
- codeforce A. Pasha and Pixels
- Html标签使用——文字、列表、表格、超链接