CCArray and CCDictionary instead of STL

CCArray and CCDictionary instead of STL
0.0 0


Just wondering the reason that CCArray/CCDictionary/etc are created instead of wrapping STL library such as std:vector/std:list
Does it work faster?


CCArray and CCDictionary classes are used to hold most cocos2d-x classes. Both containers have a auto-release mechanism added to it.


In that case, the question is why not to create CCArray and CCDictionary that has a std list of CCObjects instead of pointer list

For example,I will write that way

class CC_DLL CCDictionary : public CCObject
std::vector m_pElements;

It will then be able to extend the class with the help of STL library such as qsort/map/etc