From 5e15466696d36df6cdf4eef4f9c08fb657c6f31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Mon, 16 Apr 2012 14:36:03 +0000 Subject: [PATCH] BUGFIX: Memory leak in Parameterization_mesh_feature_extractor Parameterization_mesh_feature_extractor wasn't cleaning up the BorderS it allocated. --- .../include/CGAL/Parameterization_mesh_feature_extractor.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Surface_mesh_parameterization/include/CGAL/Parameterization_mesh_feature_extractor.h b/Surface_mesh_parameterization/include/CGAL/Parameterization_mesh_feature_extractor.h index 6942c73b5f5..b0c240174c0 100644 --- a/Surface_mesh_parameterization/include/CGAL/Parameterization_mesh_feature_extractor.h +++ b/Surface_mesh_parameterization/include/CGAL/Parameterization_mesh_feature_extractor.h @@ -98,7 +98,12 @@ public: m_nb_borders = -1; m_genus = -1; } - virtual ~Parameterization_mesh_feature_extractor() {} + + virtual ~Parameterization_mesh_feature_extractor() { + for (typename Skeleton::iterator iter = m_skeleton.begin(); + iter != m_skeleton.end(); ++iter) + delete *iter; + } /// Get number of borders. int get_nb_borders()