Unload uncompressed image data

This commit is contained in:
Ray
2021-12-23 11:08:23 +01:00
parent 110553535b
commit 379ab63197
8 changed files with 8 additions and 0 deletions

View File

@ -311,6 +311,7 @@ static void GuiLoadStyleAshes(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -332,6 +332,7 @@ static void GuiLoadStyleBluish(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -319,6 +319,7 @@ static void GuiLoadStyleCandy(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -333,6 +333,7 @@ static void GuiLoadStyleCherry(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -318,6 +318,7 @@ static void GuiLoadStyleCyber(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -315,6 +315,7 @@ static void GuiLoadStyleJungle(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -327,6 +327,7 @@ static void GuiLoadStyleLavanda(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font

View File

@ -311,6 +311,7 @@ static void GuiLoadStyleTerminal(void)
// Load texture from image
font.texture = LoadTextureFromImage(imFont);
UnloadImage(imFont); // Uncompressed data can be unloaded from memory
// Copy char recs data from global fontRecs
// NOTE: Required to avoid issues if trying to free font