__unsafe_unretained的含义
2024-08-25 19:25:51
- OC的变量限定词的官方解释:
__strong
is the default. An object remains “alive” as long as there is a strong pointer to it.(当属性没有使用修饰词时,默认的是strong,只要有强指针指向它,这个对象会一直存在)__weak
specifies a reference that does not keep the referenced object alive. A weak reference is set tonil
when there are no strong references to the object. (_weak修饰的对象并不会持有改对象,当一个对象没有强引用的指针指向它时,weak修饰的对象会被制空)__unsafe_unretained
specifies a reference that does not keep the referenced object alive and is not set tonil
when there are no strong references to the object. If the object it references is deallocated, the pointer is left dangling.(__unsafe_unretained 和weak类似,但是当对象没有被强引用时,__unsafe_unretained修饰的对象还会指向该对象的地址)。
最新文章
- 缩小窗口时CSS背景图出现右侧空白BUG的解决方法
- 理解margin
- ReportService未指定 OverwriteDataSources
- mpu
- 轻松获取LAMP或LNMP环境编译参数
- Raphaël 是一个小型的 JavaScript 库,用来简化在页面上显示向量图的工作。你可以用它在页面上绘制各种图表、并进行图片的剪切、旋转等操作。
- 给大家普及一下CPU和SOC的基本知识,好让大家在盲目喝彩做出基本的判断
- Yaha,Yaho
- 有关XCode6(iOS8)UITableViewCell与iOS7在UITableViewCell问题
- win2008阿里一键环境包mysql老是1067报错
- java模拟登陆功能
- 14、使用csv和excel存储豆瓣top250电影信息
- WEB安全之垃圾信息防御措施
- TP5实现邮件发送(PHP 利用QQ邮箱发送邮件「PHPMailer」)
- CSS: Position Introduction.
- oozie无法识别hadoopHA中的ns1
- Flappy Bird背后的故事
- Redis的Pub/Sub机制存在的问题以及解决方案
- Centos7 FPM 安装mysql8
- if、for、while、do 等语句自占一行