assign:默认参数setter 方法不会引起引用计数的变化
retain:setter方法首先释放旧的对象,将旧对象的值赋予输入对象,再提高输入对象的引用计数为1
copy:setter 方法首先建立了一个相同的对象,先对象引用计数为1旧对象引用计数无变化
ARC中
strong==retain
weak 属性是weak pointer 当对象释放时会自动设置为nil
unsafe unretained 等同于之前的assign 只在IOS4中才使用
copy ==copy 复制一个对象并创建strong关联
assign 保持不变 修饰基础数据.
关键字
_Strong: 变量缺省参照类型,强参照
_weak 弱参照
_unsafe_unretained
没有强引用引用它会自动释放