mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-19 04:26:52 -04:00
Fix some texture leaks on game exit
This commit is contained in:
parent
b11d5185e8
commit
b2a6fd87ec
@ -55,7 +55,9 @@ namespace ClassicalSharp {
|
|||||||
void IDisposable.Dispose() {
|
void IDisposable.Dispose() {
|
||||||
Events.TextureChanged -= TextureChanged;
|
Events.TextureChanged -= TextureChanged;
|
||||||
SetNewScreen(null);
|
SetNewScreen(null);
|
||||||
|
|
||||||
statusScreen.Dispose();
|
statusScreen.Dispose();
|
||||||
|
hudScreen.Dispose();
|
||||||
|
|
||||||
if (activeScreen != null)
|
if (activeScreen != null)
|
||||||
activeScreen.Dispose();
|
activeScreen.Dispose();
|
||||||
|
@ -110,6 +110,7 @@ static void Gui_Free(void) {
|
|||||||
Event_UnregisterEntry(&TextureEvents_FileChanged, NULL, Gui_FileChanged);
|
Event_UnregisterEntry(&TextureEvents_FileChanged, NULL, Gui_FileChanged);
|
||||||
Gui_CloseActive();
|
Gui_CloseActive();
|
||||||
Elem_TryFree(Gui_Status);
|
Elem_TryFree(Gui_Status);
|
||||||
|
Elem_TryFree(Gui_HUD);
|
||||||
|
|
||||||
if (Gui_Active) { Elem_TryFree(Gui_Active); }
|
if (Gui_Active) { Elem_TryFree(Gui_Active); }
|
||||||
Gfx_DeleteTexture(&Gui_GuiTex);
|
Gfx_DeleteTexture(&Gui_GuiTex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user