mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-01 07:40:26 +02:00
Fix memory leak caused by missing drop
This commit is contained in:
committed by
Josiah VanderZee
parent
f8f10248b4
commit
e2b05f0dc9
@ -93,6 +93,7 @@ IAnimatedMesh* CGLTFMeshFileLoader::createMesh(io::IReadFile* file)
|
||||
|
||||
SAnimatedMesh* animatedMesh(new SAnimatedMesh {});
|
||||
animatedMesh->addMesh(baseMesh);
|
||||
baseMesh->drop();
|
||||
|
||||
return animatedMesh;
|
||||
}
|
||||
@ -116,6 +117,7 @@ void CGLTFMeshFileLoader::loadPrimitives(
|
||||
meshbuf->append(vertices.data(), vertices.size(),
|
||||
indices.data(), indices.size());
|
||||
mesh->addMeshBuffer(meshbuf);
|
||||
meshbuf->drop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user