Cocos2d-x 2.2.2 GUI库的Widget类,有个removeAllChildren()方法为什么不遍历删除子节点了??

Cocos2d-x 2.2.2 GUI库的Widget类,有个removeAllChildren()方法为什么不遍历删除子节点了??

代码如下:

void Widget::removeAllChildren()
{
removeAllChildrenWithCleanup(true);
}

void Widget::removeAllChildrenWithCleanup(bool cleanup)
{
if(_widgetChildren && _widgetChildren->count() > 0)
{
CCObject* child;
CCARRAY_FOREACH(_widgetChildren, child)
{
removeChild((CCNode*)child, cleanup);
}
}
_widgetChildren->removeAllObjects();
}


官方已经修正该BUG

removeChild((CCNode*)child, cleanup);改成CCNodeRGBA::removeChild((CCNode*)child, cleanup);