assign和weak的区别

weak:

弱指针,引用计数器不会+1,如果指向的对象被销毁,指针自动清空。ARC中才出现的weak

assign:

_unsafe_unretained修饰,不会让引用计数+1,如果指向对象被销毁,指针不会清空

results matching ""

    No results matching ""