diff --git a/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h b/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h index d9500a27921..4f156d05be8 100644 --- a/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h +++ b/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/bipartite_nary_union_sorted_combined.h @@ -220,6 +220,16 @@ bipartite_nary_union_sorted_combined(Nef_polyhedron& N0, Ntmp.delegate(Convertor, true); CGAL_assertion(Ntmp.is_valid()); nary_union.add_polyhedron(Ntmp); + delete GcG.sphere_map(); + } + + // clean up the spherical_mapS + for(GM_iterator it = GM0.begin(); it != GM0.end(); ++it) { + delete it->first.sphere_map(); + } + + for(GM_iterator it = GM1.begin(); it != GM1.end(); ++it) { + delete it->first.sphere_map(); } return nary_union.get_union();