From 4c0ab7a739085a32688f34947c0b1812a31d92d7 Mon Sep 17 00:00:00 2001 From: aura Date: Wed, 11 Mar 2026 00:41:44 +0100 Subject: fix mem leaks, string convenience funcs --- src/render/gl_batch.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/render') diff --git a/src/render/gl_batch.h b/src/render/gl_batch.h index e7f979c..31ed0ea 100644 --- a/src/render/gl_batch.h +++ b/src/render/gl_batch.h @@ -80,15 +80,19 @@ inline GL_BATCH* gl_batch_create( template inline void gl_batch_destroy( GL_BATCH* batch ) { glDeleteBuffers( 1, &batch->vbuffer ); - for( auto& it : batch->calls ) + for( auto& it : batch->calls ) { it.textures.clear(); + it.vertices.clear(); + } delete batch; } template inline void gl_batch_empty( GL_BATCH* batch ) { - for( auto& it : batch->calls ) + for( auto& it : batch->calls ) { it.textures.clear(); + it.vertices.clear(); + } batch->calls.clear(); } -- cgit v1.2.3