mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +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
@@ -12533,9 +12533,16 @@ IfcParse::schema_definition* IFC2X3_populate_schema() {
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
const schema_definition& Ifc2x3::get_schema() {
|
||||
static std::unique_ptr<schema_definition> schema;
|
||||
|
||||
static const schema_definition* s = IFC2X3_populate_schema();
|
||||
return *s;
|
||||
void Ifc2x3::clear_schema() {
|
||||
schema.reset();
|
||||
}
|
||||
|
||||
const schema_definition& Ifc2x3::get_schema() {
|
||||
if (!schema) {
|
||||
schema.reset(IFC2X3_populate_schema());
|
||||
}
|
||||
return *schema;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user