From b556d063e6b53fcca4164d11141924c1cc47c1d8 Mon Sep 17 00:00:00 2001 From: Andreas Schwarzl Date: Wed, 21 Jan 2015 11:24:06 +0100 Subject: [PATCH] Fix memory leaks by releasing text buffers. --- gltext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gltext.cpp b/gltext.cpp index 5fbe03d..4c577a4 100644 --- a/gltext.cpp +++ b/gltext.cpp @@ -462,6 +462,7 @@ void Font::cacheCharacters(std::string chars) { self->cacheGlyph(glyphs[i].codepoint); } } + hb_buffer_destroy (buffer); } void Font::draw(std::string text) { @@ -501,6 +502,7 @@ void Font::draw(std::string text) { self->pen_x += positions[i].x_advance >> 6; self->pen_y += positions[i].y_advance >> 6; } + hb_buffer_destroy (buffer); } }