Return to Cocos2d Playback Library

ARC enabled and disabled

Questions related to Cocos2d playback library should be asked here.

ARC enabled and disabled

Postby Shenghua Su » April 15th, 2014, 9:01 am

Your playback lib assumed ARC enabled compilation. Although ARC turned on is the future, the cocos2d (v2.1) currently uses manual memory management.
To integrate your lib into a cocos2d project, there are 3 ways to mix ARC on and off source code
1. set your playback lib as separate lib project and turn on ARC in project setting ---> not easy to debug?
2. import your playback source files directly into cocos2d project and mark these source files' compilation arg as "-fobjc-arc" ---> still not convenient when debugging cross ARC enabled to disabled code ?
3. insert macro for ARC on/off state detection and write corresponding code into related playback lib source files ---> source code become less easier to read

actually I choose 3 to maintain my own version of your lib, what is your advice? I have seen similar macro in a few places of your lib source code, do you have any plan for releasing both ARC ON and OFF compatible playback lib?
User avatar
Shenghua Su
 
Posts: 6
Joined: March 11th, 2014, 1:06 am

Re: ARC enabled and disabled

Postby Timur Losev » April 16th, 2014, 1:16 am

Shenghua Su wrote:Your playback lib assumed ARC enabled compilation. Although ARC turned on is the future, the cocos2d (v2.1) currently uses manual memory management.
To integrate your lib into a cocos2d project, there are 3 ways to mix ARC on and off source code
1. set your playback lib as separate lib project and turn on ARC in project setting ---> not easy to debug?
2. import your playback source files directly into cocos2d project and mark these source files' compilation arg as "-fobjc-arc" ---> still not convenient when debugging cross ARC enabled to disabled code ?
3. insert macro for ARC on/off state detection and write corresponding code into related playback lib source files ---> source code become less easier to read

actually I choose 3 to maintain my own version of your lib, what is your advice? I have seen similar macro in a few places of your lib source code, do you have any plan for releasing both ARC ON and OFF compatible playback lib?



Hello,
It is sad that you use cocos2d v2.1. We have reworked GAF-playback for using ARC many time ago. Unfortunately, we don't plan to release non-ARC version since it has low priority.

Regarding item 3, changing the GAF's code you will be doomed for making merge every time you had pulled. Although, we don't expect big changes for few month.

Thanks,
Timur.
User avatar
Timur Losev
 
Posts: 70
Joined: January 9th, 2014, 7:30 am

Return to Cocos2d Playback Library

Who is online

Users browsing this forum: No registered users and 1 guest