一、前言
ios开发中,@property的修饰就有很多的修饰词,如retain、assign、strong、weak、nonatomic等等,而这些修饰词在ARC模式下与非ARC模式下也是略有不同。下面先简单说说ARC模式
二、什么是ARC
ARC是iOS 5推出的新功能,全称为Automatic Reference Counting。一句话说,...
分类:
移动开发 时间:
2014-11-04 19:47:10
阅读次数:
262
assign / deassginforce /releasethe procedural continuous assignments(using keywords assign and force) are procedural statements that allow expressions...
分类:
其他好文 时间:
2014-11-04 19:19:18
阅读次数:
210
strong相当于retain,week相当于assign:1. 接触过C,那么假设你用malloc分配了一块内存,并且把它的地址赋值给了指针a,后来你希望指针b也共享这块内存,于是你又把a赋值给 (assign)了b。此时a和b指向同一块内存,请问当a不再需要这块内存,能否直接释放它?答案是否定的...
分类:
其他好文 时间:
2014-11-03 14:19:13
阅读次数:
121
Verilog HDL语法的I/O端口分为三类:input、output、inout。input端口不能被定义成寄存器变量型,只能是线网型;output端口信号可定义成寄存器型变量,并在always块内可以被赋值使用;而inout型双向端口信号不能被定义成reg型变量,因此只能采用assign赋值语...
分类:
其他好文 时间:
2014-10-30 20:44:09
阅读次数:
267
越是看似简单、经常接触的。我们越是不知其所以然。这就是我写本文的原因。阻塞和非阻塞赋值一般使用在进程中,包括always和initial进程、assign赋值等操作中。阻塞赋值与非阻塞赋值always @(event-expression) begin ...... end同样可将采用非阻...
分类:
其他好文 时间:
2014-10-29 16:42:08
阅读次数:
263
我遇到如下问题:
int count=0;
listener->onTouchMoved=[count](Touch* t,Event* e){
count++;
log("onTouchMoved");
};
Xcode下的编译错误为:Cannot assign to a variable captured by copy...
分类:
编程语言 时间:
2014-10-28 13:58:42
阅读次数:
166
Go functions may be closures. A closure is a function value that references variables from outside its body. The function may access and assign to the...
分类:
其他好文 时间:
2014-10-28 00:39:06
阅读次数:
191
[root@localhost ~]# ifconfig eth0:1 upSIOCSIFFLAGS: Cannot assign requested address出现以上错误的原因是把eth0:1的信息写在了ifcfg-eth0:1的配置文件里,本意是想,开机启动的时候自动加载,实现一块网卡双I...
分类:
其他好文 时间:
2014-10-26 22:37:38
阅读次数:
281
1 2.@property属性的用法2 * weak(assign) : 代理\UI控件3 * strong(retain) : 其他对象(除代理\UI控件\字符串以外的对象)4 * copy : 字符串5 * assign : 非对象类型(基本数据类型int\float\BOOL\枚举\结构体)
分类:
其他好文 时间:
2014-10-25 15:47:11
阅读次数:
166
1.回答person的retainCount值,并解释为什么Person*per=[[Personalloc]init];此时person的retainCount的值是1self.person=per;在self.person时,如果是assign,person的retainCount的值不变,仍为1
若是:retainperson的retainCount的值加1,变为2若是:copyperson的re..
分类:
其他好文 时间:
2014-10-19 17:13:19
阅读次数:
220