Destroy FilamentInstance's mRoot in EntityManager (#6500)

This commit is contained in:
Powei Feng
2023-01-27 16:05:42 -08:00
committed by GitHub
parent 73880428dc
commit 09248cd451
+3 -1
View File
@@ -38,8 +38,10 @@ FFilamentAsset::~FFilamentAsset() {
releaseSourceData();
// Destroy all instance objects. Instance entities / components are
// destroyed later in this method because they are owned by the asset.
// destroyed later in this method because they are owned by the asset
// (except for the root of the instance).
for (FFilamentInstance* instance : mInstances) {
mEntityManager->destroy(instance->mRoot);
delete instance;
}