From f7396790ffaa624d869ec2f880efb1f62a74dc7c Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Mon, 7 Jul 2014 13:41:33 +0200 Subject: [PATCH] Fix merge function Fixes memory leaks, and maybe some other potential problems --- STL_Extension/include/CGAL/Concurrent_compact_container.h | 1 + 1 file changed, 1 insertion(+) diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 9a4b8e731e3..e8e0e167462 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -693,6 +693,7 @@ void Concurrent_compact_container::merge(Self &d) set_type(d.m_first_item, m_last_item, BLOCK_BOUNDARY); m_last_item = d.m_last_item; } + m_all_items.insert(m_all_items.end(), d.m_all_items.begin(), d.m_all_items.end()); // Add the capacities. m_capacity += d.m_capacity; // It seems reasonnable to take the max of the block sizes.