Browse Source

gpu: fix a memory leak in the VertexBuffer and IndexBuffer classes.

legacy
Sam Hocevar sam 12 years ago
parent
commit
64b37d8897
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      src/gpu/indexbuffer.cpp
  2. +1
    -0
      src/gpu/vertexbuffer.cpp

+ 1
- 0
src/gpu/indexbuffer.cpp View File

@@ -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)


+ 1
- 0
src/gpu/vertexbuffer.cpp View File

@@ -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)


Loading…
Cancel
Save