Browse Source

Unload uncompressed image data

Ray 3 years ago
parent
commit
379ab63197

+ 1 - 0
styles/ashes/ashes.h

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

+ 1 - 0
styles/bluish/bluish.h

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

+ 1 - 0
styles/candy/candy.h

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

+ 1 - 0
styles/cherry/cherry.h

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

+ 1 - 0
styles/cyber/cyber.h

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

+ 1 - 0
styles/jungle/jungle.h

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

+ 1 - 0
styles/lavanda/lavanda.h

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

+ 1 - 0
styles/terminal/terminal.h

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