Delete nodes in vector before clearing it

This commit is contained in:
Dominik Wernberger 2020-08-30 15:45:12 +02:00 committed by Ian McInerney
parent 4ca7993382
commit 6c164310ec
1 changed files with 3 additions and 0 deletions

View File

@ -166,6 +166,9 @@ void RC_TREE_MODEL::rebuildModel( RC_ITEMS_PROVIDER* aProvider, int aSeverities
if( m_rcItemsProvider )
m_rcItemsProvider->SetSeverities( m_severities );
for( RC_TREE_NODE* topLevelNode : m_tree )
delete topLevelNode;
m_tree.clear();
for( int i = 0; m_rcItemsProvider && i < m_rcItemsProvider->GetCount(); ++i )