I recently downloaded cocos2d-2.1rc0-x-2.1.3 and today I found that the code invoked init() in the constructors of CCArray:
CCArray::CCArray()
: data(NULL)
{
init();
}
CCArray::CCArray(unsigned int capacity)
: data(NULL)
{
initWithCapacity(capacity);
}
Not only this is confusing and a little ugly, it also caused unnecessary additional allocation/free operations in the create() functions.