cocos2d::Vector vs. std::vector

from: http://discuss.cocos2d-x.org/t/why-use-cocos2d-vector-instead-of-std-vector/14527

cocos2d::Vector has the limitation that the objects added to it must have cocos2d::Ref as a base class. The benefit comes with memory management. When you add an object to a cocos2d::Vector, it retains the object. When you remove an object from a cocos2d::Vector, it releases the object. This helps to ensure that the objects in the cocos2d::Vector are valid objects (unless you start manually releasing things like crazy for no reason)

cocos2d::Ref objects which are created by static ::create() function are in the autorelease pool by default. Thus they should be retained when they are kept in the containers like vector. cocos2d::Vector do it instead of me.

To keep primitive values or pointers of some objects without retain just for some batch process, std::vector can be used.