There is a memory leak

This commit is contained in:
Dynamitos
2023-11-30 11:51:53 +01:00
parent d1475d506e
commit 1493627ceb
20 changed files with 91 additions and 102 deletions
+2 -2
View File
@@ -10,7 +10,7 @@
using namespace Seele;
constexpr static uint64 NUM_DEFAULT_ELEMENTS = 16 * 1024;
constexpr static uint64 NUM_DEFAULT_ELEMENTS = 1024 * 1024;
void VertexData::resetMeshData()
{
@@ -166,7 +166,7 @@ MeshId VertexData::allocateVertexData(uint64 numVertices)
head += numVertices;
if (head > verticesAllocated)
{
verticesAllocated = head;
verticesAllocated = std::max(head, verticesAllocated + NUM_DEFAULT_ELEMENTS);
resizeBuffers();
}
return res;