mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Add IfcParse::clear_schemas() and individual Ifc___::clear_schema() to clear any resource allocated by registered schemas
Add missing virtual destructors in IfcSchema.h
This commit is contained in:
committed by
Thomas Krijnen
parent
93fd3f97e3
commit
e677355438
@@ -15071,9 +15071,16 @@ IfcParse::schema_definition* IFC4_populate_schema() {
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
const schema_definition& Ifc4::get_schema() {
|
||||
static std::unique_ptr<schema_definition> schema;
|
||||
|
||||
static const schema_definition* s = IFC4_populate_schema();
|
||||
return *s;
|
||||
void Ifc4::clear_schema() {
|
||||
schema.reset();
|
||||
}
|
||||
|
||||
const schema_definition& Ifc4::get_schema() {
|
||||
if (!schema) {
|
||||
schema.reset(IFC4_populate_schema());
|
||||
}
|
||||
return *schema;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user