From db63347ee60c87d04305a9da98cc828586443526 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 1 Jun 2017 15:11:17 +0200 Subject: [PATCH] Also clear triangulation signals on destruction --- include/deal.II/grid/tria.h | 7 ++++--- source/grid/tria.cc | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 5ebac078a9..bbda49e643 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -2120,9 +2120,10 @@ public: /** * This signal is triggered whenever the Triangulation::clear() function - * is called. This signal is also triggered when loading a triangulation - * from an archive via Triangulation::load() as the previous content of - * the triangulation is first destroyed. + * is called and in the destructor of the triangulation. This signal is + * also triggered when loading a triangulation from an archive via + * Triangulation::load() as the previous content of the triangulation is + * first destroyed. * * The signal is triggered before the data structures of the * triangulation are destroyed. In other words, the functions diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 1c86b45541..24f9ac015a 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -9039,6 +9039,9 @@ Triangulation::operator= (Triangulation &&tria) template Triangulation::~Triangulation () { + // notify listeners that the triangulation is going down... + signals.clear(); + levels.clear (); // the vertex_to_boundary_id_map_1d field should be unused except in -- 2.39.5