mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
Fixed memory leak and removed unused code
This commit is contained in:
parent
856054666d
commit
2f05ecb9ad
@ -42,7 +42,7 @@ RimEclipseInputPropertyCollection::RimEclipseInputPropertyCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseInputPropertyCollection::~RimEclipseInputPropertyCollection()
|
||||
{
|
||||
|
||||
inputProperties.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -63,26 +63,6 @@ std::vector<RimEclipseInputProperty*> RimEclipseInputPropertyCollection::findInp
|
||||
return result;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Remove given input property from collection and checks if the associated file is referenced by other input
|
||||
/// properties
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseInputPropertyCollection::removeInputProperty(RimEclipseInputProperty* inputProperty, bool& isPropertyFileReferencedByOthers)
|
||||
{
|
||||
CVF_ASSERT(inputProperty);
|
||||
|
||||
this->inputProperties.removeChildObject(inputProperty);
|
||||
|
||||
isPropertyFileReferencedByOthers = false;
|
||||
for (size_t i = 0; i < this->inputProperties.size(); i++)
|
||||
{
|
||||
if (inputProperties[i]->fileName() == inputProperty->fileName)
|
||||
{
|
||||
isPropertyFileReferencedByOthers = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Returns the InputProperty with resultName \a resultName
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -45,9 +45,6 @@ public:
|
||||
std::vector<RimEclipseInputProperty*> findInputProperties(QString fileName);
|
||||
RimEclipseInputProperty* findInputProperty(QString resultName);
|
||||
|
||||
void removeInputProperty(RimEclipseInputProperty* inputProperty, bool& isPropertyFileReferencedByOthers);
|
||||
|
||||
|
||||
// Fields:
|
||||
caf::PdmChildArrayField<RimEclipseInputProperty*> inputProperties;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user