#764 - Quick fix that clears alot of memory, there seems to be more hiding somewhere else.

This commit is contained in:
Skabunkel 2019-02-24 00:13:50 +01:00
parent 854e5d2f7e
commit 795c5e949d

View file

@ -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);