摘要: 1、ARC 模式下 @property 参数的转变(1)在之前手动管理内存学习中,我们用到以下用法: @property (nonatomic, retain) Person *person; @property (nonatomic, assign) int age; 1> reta... 阅读全文
posted @ 2014-10-07 10:08 微雨独行 阅读(337) 评论(0) 推荐(0)
摘要: 1、基本简介(1)ARC,是 Automatic Reference Counting (自动引用计数器)的简称。(2)ARC 是自iOS 5.0 之后增加的新特性,完全消除了手动管理内存的繁琐,编译器会自动在适当的地方插入适当的 retain、release、autorelease 语句。我们不再... 阅读全文
posted @ 2014-10-07 09:28 微雨独行 阅读(456) 评论(0) 推荐(0)
摘要: 一、计数器的操作(1)retain : +1(2)release : -1(3)retainCount : 获得计数器二、set方法的内存管理(1)set方法的实现1 - (void)setCar: (Car *)car2 {3 if(_car != car)4 {5 ... 阅读全文
posted @ 2014-10-07 01:07 微雨独行 阅读(166) 评论(0) 推荐(0)
1 2