From fb59cd4004348c6040c37c74706dcdb62bb001e1 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 29 Oct 2020 16:06:26 +0100 Subject: [PATCH] ~collection() --- src/ifcgeom/taxonomy.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ifcgeom/taxonomy.h b/src/ifcgeom/taxonomy.h index 2eeac65736..c22965865d 100644 --- a/src/ifcgeom/taxonomy.h +++ b/src/ifcgeom/taxonomy.h @@ -375,6 +375,12 @@ struct collection : public geom_item { c->print(o, indent + 4); } } + + virtual ~collection() { + for (auto& c : children) { + delete c; + } + } }; struct shell : public collection {