gs-vertexbuffer: Also free layer data

Fixes a tiny memory leak caused by a missing free.

Related: #9
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2018-01-18 05:22:57 +01:00
parent 1ebb0beac4
commit 82ec6b93ec
2 changed files with 4 additions and 2 deletions

View file

@ -88,6 +88,10 @@ GS::VertexBuffer::~VertexBuffer() {
m_uvs[n] = nullptr;
}
}
if (m_layerdata) {
util::free_aligned(m_layerdata);
m_layerdata = nullptr;
}
if (m_vertexbufferdata) {
std::memset(m_vertexbufferdata, 0, sizeof(gs_vb_data));
if (!m_vertexbuffer) {

View file

@ -90,8 +90,6 @@ namespace GS {
private:
uint32_t m_size;
uint32_t m_capacity;
uint32_t m_layers;
// Memory Storage