Skip to content
Snippets Groups Projects
Commit b48c5f3e authored by Franjo's avatar Franjo
Browse files

Getting rid of memory leaks

parent 6bb61e2e
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment