From 7a0ba257a5dcd232841c9effe60f7a1e08b032a7 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 23 Aug 2020 13:01:41 -0400 Subject: [PATCH] Fix the giant FlatListView leak of std::pair objects that causes an equivalent number of LLSD objects to leak --- indra/llui/llflatlistview.cpp | 5 +++++ indra/llui/llflatlistview.h | 1 + 2 files changed, 6 insertions(+) diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 5e00bf7f450..b8f34868db4 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -505,6 +505,11 @@ LLFlatListView::LLFlatListView(const LLFlatListView::Params& p) } }; +LLFlatListView::~LLFlatListView() +{ + delete_and_clear(mItemPairs); +} + // virtual void LLFlatListView::draw() { diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 6bcc94fe47f..f9c1b56b534 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -299,6 +299,7 @@ class LLFlatListView : public LLScrollContainer, public LLEditMenuHandler virtual S32 notify(const LLSD& info) ; + virtual ~LLFlatListView(); protected: /** Pairs LLpanel representing a single item LLPanel and LLSD associated with it */ -- GitLab