Fix leak of item pairs during LLFlatListView destruction

master
Rye Mutt 2022-10-19 22:15:07 -04:00
parent 8e4cfe8aed
commit 2745465c73
2 changed files with 12 additions and 0 deletions

View File

@ -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()
{

View File

@ -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 */