diff --git a/source/gs-vertexbuffer.cpp b/source/gs-vertexbuffer.cpp index e9e6bc56..88eddecb 100644 --- a/source/gs-vertexbuffer.cpp +++ b/source/gs-vertexbuffer.cpp @@ -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) { diff --git a/source/gs-vertexbuffer.h b/source/gs-vertexbuffer.h index 9d6b4b27..95cbddda 100644 --- a/source/gs-vertexbuffer.h +++ b/source/gs-vertexbuffer.h @@ -90,8 +90,6 @@ namespace GS { private: uint32_t m_size; uint32_t m_capacity; - - uint32_t m_layers; // Memory Storage