From 2745465c732d3c0bcaba6e560d69d3fc8adcff28 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 19 Oct 2022 22:15:07 -0400 Subject: Fix leak of item pairs during LLFlatListView destruction --- indra/llui/llflatlistview.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 5e00bf7f45..b13e7389cc 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -505,6 +505,17 @@ LLFlatListView::LLFlatListView(const LLFlatListView::Params& p) } }; +LLFlatListView::~LLFlatListView() +{ + for (pairs_iterator_t it = mItemPairs.begin(); it != mItemPairs.end(); ++it) + { + mItemsPanel->removeChild((*it)->first); + (*it)->first->die(); + delete *it; + } + mItemPairs.clear(); +} + // virtual void LLFlatListView::draw() { -- cgit v1.2.3