From 64b37d88972694b685381ae40dddf4fee7d365b2 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 1 May 2012 13:40:52 +0000 Subject: [PATCH] gpu: fix a memory leak in the VertexBuffer and IndexBuffer classes. --- src/gpu/indexbuffer.cpp | 1 + src/gpu/vertexbuffer.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gpu/indexbuffer.cpp b/src/gpu/indexbuffer.cpp index c69283c5..e445bd78 100644 --- a/src/gpu/indexbuffer.cpp +++ b/src/gpu/indexbuffer.cpp @@ -81,6 +81,7 @@ IndexBuffer::~IndexBuffer() glDeleteBuffers(1, &m_data->m_ibo); delete[] m_data->m_memory; #endif + delete m_data; } void *IndexBuffer::Lock(size_t offset, size_t size) diff --git a/src/gpu/vertexbuffer.cpp b/src/gpu/vertexbuffer.cpp index 8fcd17a6..0ba232e0 100644 --- a/src/gpu/vertexbuffer.cpp +++ b/src/gpu/vertexbuffer.cpp @@ -487,6 +487,7 @@ VertexBuffer::~VertexBuffer() glDeleteBuffers(1, &m_data->m_vbo); delete[] m_data->m_memory; #endif + delete m_data; } void *VertexBuffer::Lock(size_t offset, size_t size)