ARC除了插入retain和release还会做什么
What will be done with ARC besides inserting the retain and release
ARC除了插入retain和release,还会做什么?据说ARC会优化代码?
"Inserting the retain and release" 实际上几乎就是 ARC 所做的一切(特别是如果你包括自动释放)。实际上,它遵循 The Golden Rules of Memory Management,因此您不必这样做。
它还增加了一项功能:它引入了 automatic nilification of weak references,以防止悬挂指针。
ARC除了插入retain和release,还会做什么?据说ARC会优化代码?
"Inserting the retain and release" 实际上几乎就是 ARC 所做的一切(特别是如果你包括自动释放)。实际上,它遵循 The Golden Rules of Memory Management,因此您不必这样做。
它还增加了一项功能:它引入了 automatic nilification of weak references,以防止悬挂指针。