请问CCArray的createWithArray函数是不是有问题

RT,发现CCArray的copy函数没多态化,直接调用CObject的copy函数,导致崩溃。不知道是不是这样?

CCObject* CCCopying::copyWithZone(CCZone *pZone)
{
    CC_UNUSED_PARAM(pZone);
    CCAssert(0, "not implement");
    return 0;
}
……
CCObject* CCObject::copy()
{
    return copyWithZone(0);
}
……
class CC_DLL CCArray : public CCObject
{
public:
……
    static CCArray* createWithArray(CCArray* otherArray);
……
}
……
CCArray* CCArray::createWithArray(CCArray* otherArray)
{
    CCArray* pRet = (CCArray*)otherArray->copy();
    pRet->autorelease();
    return pRet;
}

CCArray中对copyWithZone虚函数进行了重写:

CCObject* CCArray::copyWithZone(CCZone* pZone)
{
CCAssert(pZone == NULL, “CCArray should not be inherited.”);
CCArray* pArray = new CCArray();
pArray->initWithCapacity(this->data->num > 0 ? this->data->num : 1);

CCObject* pObj = NULL;
CCObject* pTmpObj = NULL;
CCARRAY_FOREACH(this, pObj)
{
    pTmpObj = pObj->copy();
    pArray->addObject(pTmpObj);
    pTmpObj->release();
}
return pArray;

}