Unsafe_unretain Vs 弱 VS 分配
Unsafe_unretain Vs Weak VS Assign
这 3 个属性之间的主要区别是什么??有人说 Unsafe_Unretain 与 weak 相同,但在非 ARC 环境中。
有人说 Unsafe_unretain 与 ARC env 中的 Assign 相同?
实际差异是什么?
从 here 开始,下次您可以在 google 上搜索问题。
Assign is identical to weak except that it does not set pointers to deallocated instances to nil, potentially leaving dangling pointers. Assign and unsafe_unretained are identical in usage.
在 iOS 4 或以下中使用 unsafe_unretained,否则,使用 assign。 Weak 不同于 unsafe_unretained and assign.
这 3 个属性之间的主要区别是什么??有人说 Unsafe_Unretain 与 weak 相同,但在非 ARC 环境中。 有人说 Unsafe_unretain 与 ARC env 中的 Assign 相同? 实际差异是什么?
从 here 开始,下次您可以在 google 上搜索问题。
Assign is identical to weak except that it does not set pointers to deallocated instances to nil, potentially leaving dangling pointers. Assign and unsafe_unretained are identical in usage.
在 iOS 4 或以下中使用 unsafe_unretained,否则,使用 assign。 Weak 不同于 unsafe_unretained and assign.