Fix memory leak for data source ensemble summary (#8919)

* Do not create summary case group twice

* Fix memory leak of objects contained in childArrayFields
Use deleteAllChildObjects to delete objects instead of clear()
Rename collection function clear() -> deleteAllChildObjects

* Early exit for empty path

* Reduce redundant calls to refreshMetaData
This commit is contained in:
Magne Sjaastad
2022-05-19 11:51:22 +02:00
committed by GitHub
parent 558d675d44
commit 119367783b
7 changed files with 7 additions and 11 deletions

View File

@@ -333,10 +333,10 @@ RimSummaryAddressCollection* RimSummaryAddressCollection::getOrCreateSubfolder(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryAddressCollection::clear()
void RimSummaryAddressCollection::deleteAllChildObjects()
{
m_adresses.clear();
m_subfolders.clear();
m_adresses.deleteAllChildObjects();
m_subfolders.deleteAllChildObjects();
}
//--------------------------------------------------------------------------------------------------