Merge pull request #766 from Skabunkel/master

#764 - Quick fix that clears alot of memory.
This commit is contained in:
Ray
2019-02-24 01:15:32 +01:00
committed by GitHub

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