I was wondering if you can enable ARC in a Box2d project without any issues, or if it is simpler and easier to not use ARC with Box2d projects?
Asked
Active
Viewed 126 times
0

iHunter
- 6,205
- 3
- 38
- 56

Chris Brasino
- 296
- 2
- 14
-
You can [disable ARC on per-file basis](http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project) – iHunter Aug 27 '13 at 17:06
-
1Regarding box2D, since it's in C++, there is no ARC or non-ARC for it. ARC doesn't affect it at all. For cocos2d in general I suggest you reading here: http://stackoverflow.com/questions/8532557/does-cocos2d-support-arc – Jack Aug 27 '13 at 17:10
1 Answers
1
Enable ARC, Box2D is not affected by ARC and it's not wise to start any new project without ARC.
The only thing you need to consider is to __bridge
cast from and to from Box2D's void* userData properties. Plenty of examples abound, and really simple.

CodeSmile
- 64,284
- 20
- 132
- 217
-
LearnCocos2D thanks that helps but could you post and example of the _bridge cast? Would greatly appreciate it:) – Chris Brasino Aug 28 '13 at 19:55