浏览代码

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

legacy
Sam Hocevar sam 12 年前
父节点
当前提交
64b37d8897
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. +1
    -0
      src/gpu/indexbuffer.cpp
  2. +1
    -0
      src/gpu/vertexbuffer.cpp

+ 1
- 0
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)


+ 1
- 0
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)


正在加载...
取消
保存