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
commit 56c79a10de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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