mirror of https://github.com/minetest/minetest.git
Fix memory leak caused by missing `drop`
This commit is contained in:
parent
725f202598
commit
4d0c53aa83
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue