Q:

how can I determine if my project is using automatic reference counting

I have been experiencing a problem where an object that I am using in a cocos2D box2D project is overwritten with garbage. After a good bit of debugging, I found that if the following line was changed from:
player = [[[Player alloc] initWithWorld:world atLocation:ccp(playerPositionX, playerPositionY)] autorelease];

to
player = [[Player alloc] initWithWorld:world atLocation:ccp(playerPositionX, playerPositionY)];

then the problem goes away. This is very confusing because this code and the underlying class definition is more or less a copy of code from the SpaceViking project described in the Learning Cocos2D book.
It occurred to me that perhaps the problem is that when I created the new project, I may have left the choice for Automatic Reference Counting selected, whereas I may not have done that for the SpaceViking project. I am currently using xcode 4.6 and can't figure out how to determine if ARC is being used in this project. I went to the build settings and searched for automatic reference counting, but could not find it.
How can I determine if my project is using automatic reference counting?

A:

Try this:
#if __has_feature(objc_arc)
/* ARC is used */
#endif

