Hacker News new | ask | show | jobs
by gurkendoktor 4902 days ago
If you use ARC from the start, then can you really understand block retain cycles (which are just two bullet items below)?

I would absolutely try to write one or two "Hello World" apps without ARC first. CMIIW but Xcode will highlight any instance where you do things differently than ARC would, there is plenty of feedback on what you are doing. And once you feel confident enough, upgrading the project just takes a few clicks.

And I found ARC to be super easy not in spite, but because I came from C++ :) it is shared_ptr vs weak_ptr all over again. Don't memcpy() them, don't create cyclic references, beware race conditions when testing if a weak_ptr is still there ...

1 comments

I love your advice: start out learning how to manage memory and it only gets easier. While ARC is great compared to manual memory management, it doesn't work on non-Objective-C object, such as CFRefs (when dealing with sound, for example).
It's even worse when you have to mix CFRefs and Objective C. Without ARC you don't need any __keywords to do so, and when you switch you know where they come from.