fix abslistview's memleaks

This commit is contained in:
houzh 2023-11-27 08:20:55 +08:00
parent 90f151e745
commit 6f0bab1e6e

View File

@ -593,7 +593,11 @@ void AbsListView::setMultiChoiceModeListener(MultiChoiceModeListener listener) {
}
void AbsListView::resetList() {
std::vector<View*>children = mChildren;
removeAllViewsInLayout();
for(auto child:children){
delete child;
}
mFirstPosition = 0;
mDataChanged = false;
mPositionScrollAfterLayout = nullptr;