@111960 写道:
先贴下代码:
void ListView::removeAllChildrenWithCleanup(bool cleanup)
{
auto start_time = clock();
ScrollView::removeAllChildrenWithCleanup(cleanup);
auto time = clock();
CCLOG("Lua:ScrollView::removeAllChildrenWithCleanup time:%lul",time - start_time);
start_time = time;
_items.clear();
time = clock();
CCLOG("Lua:items.clear() time:%lul",time - starttime);
_curSelectedIndex = -1;
_outOfBoundaryAmountDirty = true;
}我打印每个ScrollView::removeAllChildrenWithCleanup(cleanup); 和 _items.clear();花费的时间,其中 _items.clear() 花费的时间是随着ListView关闭累加的,经过测试,pageView也有遇到这种问题。希望引擎组帮忙看下,谢谢了!
帖子: 1
参与者: 1