From ee3eb6e3700df4ea1e2feae58145f4b2bb5c4bbe Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Wed, 23 Jul 2014 20:30:22 +0100
Subject: [PATCH] BUG: createPatch: cleanup

---
 .../utilities/mesh/manipulation/createPatch/createPatch.C   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
index 6f283d47941..deefbaef38c 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -186,6 +186,10 @@ void filterPatches(polyMesh& mesh, const HashSet<word>& addedPatchNames)
     else
     {
         Info<< "No patches removed." << endl;
+        forAll(allPatches, i)
+        {
+            delete allPatches[i];
+        }
     }
 }
 
-- 
GitLab