Quote:
Originally Posted by SoulRed12
So who uses this?
It looks interesting but I've spent so long learning how to use retain counts that I feel like without having to type retain and release and manage the retain count by hand, it will be harder for me to understand everything that's going on.
I'm wondering if there is any reason at all to NOT use this? I.e. will my not being able to control what is released and when lead to any problems since I'm so used to the old manual method? (I feel like an old guy scolding youngsters for having new-fangled gadgets)
|
I've been doing retains and releases for years, and it's second nature for me.
For the last couple of projects I've started using ARC. It's easier to deal with than manual retain/release. I think you are better off having a solid understanding of manual retain/release before venturing into ARC-land. That way you understand what's going on.
ARC is slick, I must say. instead of retain/release, you declare your properties as strong or weak, and strictly follow the naming conventions where methods that have new or copy in the name return retained objects and all other methods return auto-released objects. There's also a __weak qualifier you can put on instance variables and local variables, since those default to strong (strong is the equivalent of a retained property.)
I used garbage collection for a while in Mac OS, and overall decided I didn't like it. It didn't quite work. it caused temporary objects to pile up in memory, and caused your programs to stall at awkward moments when the system decided to "take out the garbage." ARC is different, and seems to be the best of both worlds.
I am a little worried about "young whippersnappers" who start doing iOS or Mac development using ARC and never really understand what's going on behind the scenes.