mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
Mark simple type instance file ownership #7226
This commit is contained in:
@@ -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
|
// Move the storage of simple type instances so that they are retained during the lifetime of the file
|
||||||
read_simple_type_instances = streamer.stealInstances();
|
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 ");
|
Logger::Status("\rDone scanning file ");
|
||||||
|
|
||||||
delete tokens;
|
delete tokens;
|
||||||
|
|||||||
Reference in New Issue
Block a user