__weak 报错
来源:互联网 发布:linux 查看服务器配置 编辑:程序博客网 时间:2024/06/05 10:22
解决方案一
在build setting 直接在search 内搜索 关键字 weak
就找到了
选中项目名字-> Target->Build Setting -> Apple LLVM7.1 - Language - Objective C ->Weak References in Manual Retain Release 将其value 设置为YES,
解决方案二:
将 `__weak` 替换成 `__unsafe_unretained` 使用 `__unsafe_unretained ` 请注意以下问题:
注意事项 使用 __unsafe_unretained
注意以下问题:
__unsafe_unretained specifies a reference that does not keep the referenced object alive and is not set to nil when there are no strong references to the object. If the object it references is deallocated, the pointer is left dangling.
设置完毕,重新编译运行。
作者:Raybon_lee
链接:http://www.jianshu.com/p/2a93f58fd18f
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
阅读全文
0 0
- __weak 报错
- __weak typeof(self) 编译报错
- iOS cannot create __weak reference in file 报错
- __weak
- __weak
- __weak
- __weak
- __weak
- __weak
- 报错:Xcode 7.3 cannot create __weak reference in file using manual reference counting
- 报错:Xcode 7.3 cannot create __weak reference in file using manual reference counting
- iOS之报错“Cannot create __weak reference in file using manual reference counting”解决办法
- 报错:cannot create __weak reference in file using manual reference counting
- 升级XCode7.3 后RAC报错“Cannot create __weak reference in file using manual reference counting”解决办法
- __weak 说明
- __weak, __strong
- __weak 注意事项
- __weak & __strong
- Object.keys()用法
- MySQL数据库备份
- POJ2503 Babelfish(AC 字典树)
- Windows下Python,Numpy函数库的安装(python2.7.13)
- 51NOD 1213 二维曼哈顿距离最小生成树
- __weak 报错
- Android 拿系统提供的内容提供者(联系人)demo
- Android——contentProvider内容提供者2,获取系统的内容
- tensorflow---深入MNIST
- TextView特殊的使用方法(炫酷)
- Lintcode89 K Sum solution 题解
- linux笔记
- JavaSE_面向对象2
- Pandas:时间序列数据基本操作和分组