From 379ab631977abc6cadf70fd13a41327d551315f1 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 23 Dec 2021 11:08:23 +0100 Subject: [PATCH] Unload uncompressed image data --- styles/ashes/ashes.h | 1 + styles/bluish/bluish.h | 1 + styles/candy/candy.h | 1 + styles/cherry/cherry.h | 1 + styles/cyber/cyber.h | 1 + styles/jungle/jungle.h | 1 + styles/lavanda/lavanda.h | 1 + styles/terminal/terminal.h | 1 + 8 files changed, 8 insertions(+) diff --git a/styles/ashes/ashes.h b/styles/ashes/ashes.h index 9ba5ebd..f301ff2 100644 --- a/styles/ashes/ashes.h +++ b/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 diff --git a/styles/bluish/bluish.h b/styles/bluish/bluish.h index 648d1bb..6020210 100644 --- a/styles/bluish/bluish.h +++ b/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 diff --git a/styles/candy/candy.h b/styles/candy/candy.h index 0ff8adf..ef5d5e6 100644 --- a/styles/candy/candy.h +++ b/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 diff --git a/styles/cherry/cherry.h b/styles/cherry/cherry.h index ec747af..93d8335 100644 --- a/styles/cherry/cherry.h +++ b/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 diff --git a/styles/cyber/cyber.h b/styles/cyber/cyber.h index d421947..627131c 100644 --- a/styles/cyber/cyber.h +++ b/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 diff --git a/styles/jungle/jungle.h b/styles/jungle/jungle.h index 08db6df..f506dc1 100644 --- a/styles/jungle/jungle.h +++ b/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 diff --git a/styles/lavanda/lavanda.h b/styles/lavanda/lavanda.h index 8952cbd..7d8c7fb 100644 --- a/styles/lavanda/lavanda.h +++ b/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 diff --git a/styles/terminal/terminal.h b/styles/terminal/terminal.h index f4ba5bb..096fa43 100644 --- a/styles/terminal/terminal.h +++ b/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