Fixed memory leak and removed unused code

This commit is contained in:
Jacob Støren 2015-12-10 11:39:10 +01:00
parent 856054666d
commit 2f05ecb9ad
2 changed files with 1 additions and 24 deletions

View File

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

View File

@ -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;