diff --git a/src/ui/CRenderBatch.cpp b/src/ui/CRenderBatch.cpp index 9bb4460..1006271 100644 --- a/src/ui/CRenderBatch.cpp +++ b/src/ui/CRenderBatch.cpp @@ -41,6 +41,10 @@ EGxBlend CSimpleBatchedMesh::GetAlphaMode() { } } +CRenderBatch::~CRenderBatch() { + this->Clear(); +} + void CRenderBatch::Clear() { this->m_texturelist.SetCount(0); diff --git a/src/ui/CRenderBatch.hpp b/src/ui/CRenderBatch.hpp index a2a1ca5..d67c9e2 100644 --- a/src/ui/CRenderBatch.hpp +++ b/src/ui/CRenderBatch.hpp @@ -52,6 +52,7 @@ class CRenderBatch { TSLink renderLink; // Member functions + ~CRenderBatch(); void Clear(); void Finish(); void Queue(CTexture* texture, EGxBlend alphaMode, int32_t posCount, const C3Vector* position, const C2Vector* texCoord, int32_t colorCount, const CImVector* color, int32_t idx, const uint16_t* indices, CGxShader* shader);