Commit b48c5f3e authored by Franjo's avatar Franjo
Browse files

Getting rid of memory leaks

parent 6bb61e2e
...@@ -522,6 +522,7 @@ void edgeExtractor::findFaceCandidates ...@@ -522,6 +522,7 @@ void edgeExtractor::findFaceCandidates
const labelList& fPatches = *facePatchPtr; const labelList& fPatches = *facePatchPtr;
bool deleteOtherFacePatchPtr(false);
if( !otherFacePatchPtr ) if( !otherFacePatchPtr )
{ {
Map<label>* helperPtr = new Map<label>(); Map<label>* helperPtr = new Map<label>();
...@@ -529,6 +530,7 @@ void edgeExtractor::findFaceCandidates ...@@ -529,6 +530,7 @@ void edgeExtractor::findFaceCandidates
findOtherFacePatchesParallel(*helperPtr, facePatchPtr); findOtherFacePatchesParallel(*helperPtr, facePatchPtr);
otherFacePatchPtr = helperPtr; otherFacePatchPtr = helperPtr;
deleteOtherFacePatchPtr = true;
} }
const Map<label>& otherFacePatch = *otherFacePatchPtr; const Map<label>& otherFacePatch = *otherFacePatchPtr;
...@@ -585,6 +587,9 @@ void edgeExtractor::findFaceCandidates ...@@ -585,6 +587,9 @@ void edgeExtractor::findFaceCandidates
} }
# endif # endif
} }
if( deleteOtherFacePatchPtr )
deleteDemandDrivenData(otherFacePatchPtr);
} }
void edgeExtractor::findOtherFacePatchesParallel void edgeExtractor::findOtherFacePatchesParallel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment