Pārlūkot izejas kodu

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

legacy
Sam Hocevar sam pirms 12 gadiem
vecāks
revīzija
64b37d8897
2 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. +1
    -0
      src/gpu/indexbuffer.cpp
  2. +1
    -0
      src/gpu/vertexbuffer.cpp

+ 1
- 0
src/gpu/indexbuffer.cpp Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt