Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

ListView关闭多次会卡

$
0
0

@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

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>