Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Fix memory leak caused by missing drop
Browse files Browse the repository at this point in the history
  • Loading branch information
appgurueu authored and JosiahWI committed Dec 1, 2023
1 parent a2a612e commit 5a2ebd0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/Irrlicht/CGLTFMeshFileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ IAnimatedMesh* CGLTFMeshFileLoader::createMesh(io::IReadFile* file)

SAnimatedMesh* animatedMesh(new SAnimatedMesh {});
animatedMesh->addMesh(baseMesh);
baseMesh->drop();

return animatedMesh;
}
Expand All @@ -116,6 +117,7 @@ void CGLTFMeshFileLoader::loadPrimitives(
meshbuf->append(vertices.data(), vertices.size(),
indices.data(), indices.size());
mesh->addMeshBuffer(meshbuf);
meshbuf->drop();
}
}
}
Expand Down

0 comments on commit 5a2ebd0

Please sign in to comment.