Mark simple type instance file ownership #7226

This commit is contained in:
Thomas Krijnen
2025-11-25 09:19:18 +01:00
parent 1d0b4675c0
commit 9d437b5bc3
+5
View File
@@ -1607,6 +1607,11 @@ void IfcParse::impl::in_memory_file_storage::read_from_stream(IfcParse::FileRead
// Move the storage of simple type instances so that they are retained during the lifetime of the file
read_simple_type_instances = streamer.stealInstances();
// Set file ownership on simple type instances, so that when adding them to other files, proper copies are created
for (auto& inst : read_simple_type_instances) {
inst->file_ = file;
}
Logger::Status("\rDone scanning file ");
delete tokens;