From 795c5e949d18b8ae4753cd95ad1aa96b4f399c60 Mon Sep 17 00:00:00 2001 From: Skabunkel <> Date: Sun, 24 Feb 2019 00:13:50 +0100 Subject: [PATCH 1/2] #764 - Quick fix that clears alot of memory, there seems to be more hiding somewhere else. --- src/text.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/text.c b/src/text.c index 39582db2..db7be366 100644 --- a/src/text.c +++ b/src/text.c @@ -684,6 +684,10 @@ void UnloadFont(Font font) // NOTE: Make sure spriteFont is not default font (fallback) if (font.texture.id != GetFontDefault().texture.id) { + for (int i = 0; i < font.charsCount; i++) + { + free(font.chars[i].data); + } UnloadTexture(font.texture); free(font.chars); From 374b4d3faf4c66a5ca97c21ab333bc235895f23f Mon Sep 17 00:00:00 2001 From: Skabunkel <> Date: Sun, 24 Feb 2019 00:17:54 +0100 Subject: [PATCH 2/2] Tabs to spaces --- src/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text.c b/src/text.c index db7be366..f6a4a0d8 100644 --- a/src/text.c +++ b/src/text.c @@ -684,9 +684,9 @@ void UnloadFont(Font font) // NOTE: Make sure spriteFont is not default font (fallback) if (font.texture.id != GetFontDefault().texture.id) { - for (int i = 0; i < font.charsCount; i++) + for (int i = 0; i < font.charsCount; i++) { - free(font.chars[i].data); + free(font.chars[i].data); } UnloadTexture(font.texture); free(font.chars);