mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 11:58:13 +00:00
Merge pull request #766 from Skabunkel/master
#764 - Quick fix that clears alot of memory.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user