From 65a5b883fd2e4263e3749cea64dccd0742903ef1 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Fri, 17 Jun 2016 07:41:06 +0200
Subject: [PATCH] [A/DE/DV] Fix mem leak in DirectConditionGenerator.

---
 .../DataExplorer/DataView/DirectConditionGenerator.cpp         | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Applications/DataExplorer/DataView/DirectConditionGenerator.cpp b/Applications/DataExplorer/DataView/DirectConditionGenerator.cpp
index af6431d9c34..9dbc80315a0 100644
--- a/Applications/DataExplorer/DataView/DirectConditionGenerator.cpp
+++ b/Applications/DataExplorer/DataView/DirectConditionGenerator.cpp
@@ -53,6 +53,9 @@ const std::vector< std::pair<std::size_t,double> >& DirectConditionGenerator::di
             _direct_values.push_back (std::pair<std::size_t, double>(surface_nodes[i]->getID(), val));
         }
         delete raster;
+
+        std::for_each(surface_nodes.begin(), surface_nodes.end(),
+                      std::default_delete<MeshLib::Node>());
     }
     else
         ERR("Error in DirectConditionGenerator::directToSurfaceNodes() - Data vector contains outdated values.");
-- 
GitLab