Ver código fonte

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

legacy
Sam Hocevar sam 12 anos atrás
pai
commit
64b37d8897
2 arquivos alterados com 2 adições e 0 exclusões
  1. +1
    -0
      src/gpu/indexbuffer.cpp
  2. +1
    -0
      src/gpu/vertexbuffer.cpp

+ 1
- 0
src/gpu/indexbuffer.cpp Ver arquivo

@@ -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 Ver arquivo

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


Carregando…
Cancelar
Salvar