Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does C++ code behave under ARC on iOS?

Under ARC, the compiler adds the retain,release calls. What happens to C++ pointers ? Can Objective C compiler ignore them ? I dont have much of experience with C++ mixed with Objective C, I was following a box2d tutorial which has the entire engine in c++ but the example is prior to ARC.

Do I have to do something special ?

like image 650
Amogh Talpallikar Avatar asked Dec 09 '12 12:12

Amogh Talpallikar


1 Answers

ARC is automatic reference counting and only affects NSObjects et. al (objC objects)
It doesnt affect C or C++ code (those objects you have to manage!)

like image 62
Daij-Djan Avatar answered Sep 25 '22 17:09

Daij-Djan