cocos2d-x and ARC support

cocos2d-x and ARC support
0.0 0



Has anyone tried to convert Cocos2d-x iOS version to ARC compatiable? I used the converter and I’m getting stuck here in

    [(__bridge id)m_pAutoreasePool release];  //<- I added in the @__bridge@ in (it gave me two options to fix that) and I used that one.

void CCThread::createAutoreleasePool()
    m_pAutoreasePool = [[NSAutoreleasePool alloc] init];

The error is the NSAutoreleasePool line, ‘NSAutoreleasePool’ is unavailable. Apple docs seem to say to encaplusate the code with a @autorelease scope, but does that seem applicable here?

I would thought that cocos2d-x would be easier to convert to ARC as there’s less Obj-C code. There is a requirement on a job I’m doing that it has to be ARC compatiable.


Still trying this ARC conversion, in the precheck I’m getting this error in cocos2dx/platform/ios/

NSNumber *index = (NSNumber*)CFDictionaryGetValue(touchesIntergerDict, touch);
CFDictionaryAddValue(touchesIntergerDict, touch, [NSNumber numberWithInt:unUsedIndex]);

“No matching function for call to ‘CFDictionaryGetValue’ or ‘CFDictionaryAddValue’”

AAnyone have any idea here?