summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2022-10-19 22:15:07 -0400
committerRye Mutt <rye@alchemyviewer.org>2022-10-19 22:15:17 -0400
commit2745465c732d3c0bcaba6e560d69d3fc8adcff28 (patch)
tree16b7bcb2f8d08ecd3dbe0525c15461e692ee1330 /indra/llui
parent8e4cfe8aed308675e1507321f4daffc7994fa1e3 (diff)
Fix leak of item pairs during LLFlatListView destruction
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llflatlistview.cpp11
-rw-r--r--indra/llui/llflatlistview.h1
2 files changed, 12 insertions, 0 deletions
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()
{
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index 230ea200d8..d47c1cf333 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -299,6 +299,7 @@ public:
virtual S32 notify(const LLSD& info) ;
+ virtual ~LLFlatListView();
protected:
/** Pairs LLpanel representing a single item LLPanel and LLSD associated with it */