From 6f356bf76d6749693045de066c4631797f8f2c03 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 24 Jul 2001 18:16:22 +0000 Subject: [PATCH] fix a memory leak [SVN r10698] --- include/boost/graph/detail/adjacency_list.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp index 8c1b6458..fb4cd56d 100644 --- a/include/boost/graph/detail/adjacency_list.hpp +++ b/include/boost/graph/detail/adjacency_list.hpp @@ -1489,6 +1489,9 @@ namespace boost { return *this; } inline void clear() { + for (typename StoredVertexList::iterator i = m_vertices.begin(); + i != m_vertices.end(); ++i) + delete (stored_vertex*)*i; m_vertices.clear(); m_edges.clear(); }