From ca3685900f0be75041bc7f6e1e59d810817a6789 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 3 Oct 2025 14:18:50 +0200 Subject: [PATCH] Update clear_schemas() which is now handled by unique_ptr --- src/ifcparse/IfcSchema.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ifcparse/IfcSchema.cpp b/src/ifcparse/IfcSchema.cpp index a8cb42ac0a..3e077569f8 100644 --- a/src/ifcparse/IfcSchema.cpp +++ b/src/ifcparse/IfcSchema.cpp @@ -266,9 +266,6 @@ void IfcParse::clear_schemas() { #endif Header_section_schema::clear_schema(); - // clear any remaining registered schemas - // we pop schemas until map is empty, because map iteration is invalidated after each erasure - while (!schemas.empty()) { - delete schemas.begin()->second; - } + // Schemas are owned by their respective modules in a unique_ptr, so just clear the map + schemas.clear(); }