fix: destroy prebound parts on model drop
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -651,6 +651,11 @@ impl Drop for Model {
|
||||
node.destroy();
|
||||
}
|
||||
}
|
||||
for p in self.pre_bound_parts.lock().iter() {
|
||||
if let Some(node) = p.spatial.node() {
|
||||
node.destroy();
|
||||
}
|
||||
}
|
||||
MODEL_REGISTRY.remove(self);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user