What kind of leaks does automatic reference counting in Objective-C not prevent or minimize?
- 阅读更多 关于 What kind of leaks does automatic reference counting in Objective-C not prevent or minimize?
问题 In the Mac and iOS platforms, memory leaks are often caused by unreleased pointers. Traditionally, it has always been of utmost importance to check your allocs, copies and retains to make sure each has a corresponding release message. The toolchain that comes with Xcode 4.2 introduces automatic reference counting (ARC) with the latest version of the LLVM compiler, that totally does away with this problem by getting the compiler to memory-manage your stuff for you. That's pretty cool, and it