cocos2d / cocos2d-js__old__

cocos2d in JavaScript central repository
14 stars 9 forks source link

cc:shared_ptr for cocos2d-x #78

Open ricardoquesada opened 11 years ago

ricardoquesada commented 11 years ago

It should be possible to use CCObject objects (and subclasses) in STL containers like std::map, std::vector, etc.

The CC containers like CCDictionary, CCArray should be optional.

Also CCString should be deprecated or enhanced.

A way to do it is by using a sort of shared_ptr, but internally, instead of using its own ref count, it uses the CCObject ref couting.