Fixed memory leak for cross section collection

This commit is contained in:
Magne Sjaastad 2015-12-03 08:26:38 +01:00
parent 57b0e7b18d
commit 5d81209b72
5 changed files with 19 additions and 0 deletions

View File

@ -97,6 +97,14 @@ RimCrossSection::RimCrossSection()
uiCapability()->setUiChildrenHidden(true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimCrossSection::~RimCrossSection()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -59,6 +59,7 @@ public:
public:
RimCrossSection();
~RimCrossSection();
caf::PdmField<QString> name;
caf::PdmField<bool> isActive;

View File

@ -41,6 +41,14 @@ RimCrossSectionCollection::RimCrossSectionCollection()
isActive.uiCapability()->setUiHidden(true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimCrossSectionCollection::~RimCrossSectionCollection()
{
m_crossSections.deleteAllChildObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -42,6 +42,7 @@ class RimCrossSectionCollection : public caf::PdmObject
public:
RimCrossSectionCollection();
~RimCrossSectionCollection();
caf::PdmField<bool> isActive;

View File

@ -174,6 +174,7 @@ RimView::~RimView(void)
delete m_rangeFilterCollection;
delete m_overrideRangeFilterCollection;
delete crossSectionCollection;
}
//--------------------------------------------------------------------------------------------------