From d8da1137ccf5666eb3bb4048b929a1f578a85b7d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 14 Nov 2013 10:40:49 +0100 Subject: [PATCH] Fix a memory leak in Handle_with_policy: A rep that points to another rep is like a handle So if such a rep gets deleted the reference counter must be decremented --- STL_Extension/include/CGAL/Handle_with_policy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index df463d2d321..905a5435758 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -555,6 +555,7 @@ public: } } else { h.delete_rep( rep); // we have to delete the current rep + tmp->remove_reference(); } rep = tmp; }