[Solved] Objective C’s ARC vs C++’s Manual Memory Management [duplicate]


Reference counting ‘frees’ you from always thinking about WHEN to delete an object. Anybody using the object just says, I still need it (want to retain it) or I am done with it (I release it)

that makes memory management way easier and also makes the code more manageable
BUT
it comes at the price of 2 additional method calls whenever you pass stuff around: you have to retain the object, THEN save the pointer and later also call release it.

When you deal with LOTS of objects that become a real life problem. Just the extra calls can kill your algorithms performance

and especially if you don’t need any reference counting because the scope where the object is used is clear, the overhead is just annoying.


so it is convenience + maintainability vs. speed

solved Objective C’s ARC vs C++’s Manual Memory Management [duplicate]