Fixed more memory leaks when closing stk server
This commit is contained in:
parent
8d40a69842
commit
4c6af1d381
@ -974,21 +974,39 @@ namespace GUIEngine
|
|||||||
if (ScreenKeyboard::isActive()) ScreenKeyboard::dismiss();
|
if (ScreenKeyboard::isActive()) ScreenKeyboard::dismiss();
|
||||||
if (ModalDialog::isADialogActive()) ModalDialog::dismiss();
|
if (ModalDialog::isADialogActive()) ModalDialog::dismiss();
|
||||||
|
|
||||||
//delete g_font;
|
if (g_font)
|
||||||
g_font->drop();
|
{
|
||||||
g_font = NULL;
|
//delete g_font;
|
||||||
//delete g_title_font;
|
g_font->drop();
|
||||||
g_title_font->drop();
|
g_font = NULL;
|
||||||
g_title_font = NULL;
|
}
|
||||||
//delete g_small_font;
|
if (g_title_font)
|
||||||
g_small_font->drop();
|
{
|
||||||
g_small_font = NULL;
|
//delete g_title_font;
|
||||||
g_large_font->drop();
|
g_title_font->drop();
|
||||||
g_large_font = NULL;
|
g_title_font = NULL;
|
||||||
g_digit_font->drop();
|
}
|
||||||
g_digit_font = NULL;
|
if (g_small_font)
|
||||||
g_outline_font->drop();
|
{
|
||||||
g_outline_font = NULL;
|
//delete g_small_font;
|
||||||
|
g_small_font->drop();
|
||||||
|
g_small_font = NULL;
|
||||||
|
}
|
||||||
|
if (g_large_font)
|
||||||
|
{
|
||||||
|
g_large_font->drop();
|
||||||
|
g_large_font = NULL;
|
||||||
|
}
|
||||||
|
if (g_digit_font)
|
||||||
|
{
|
||||||
|
g_digit_font->drop();
|
||||||
|
g_digit_font = NULL;
|
||||||
|
}
|
||||||
|
if (g_outline_font)
|
||||||
|
{
|
||||||
|
g_outline_font->drop();
|
||||||
|
g_outline_font = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// nothing else to delete for now AFAIK, irrlicht will automatically
|
// nothing else to delete for now AFAIK, irrlicht will automatically
|
||||||
// kill everything along the device
|
// kill everything along the device
|
||||||
|
@ -2338,6 +2338,9 @@ static void cleanSuperTuxKart()
|
|||||||
if(unlock_manager) delete unlock_manager;
|
if(unlock_manager) delete unlock_manager;
|
||||||
Online::ProfileManager::destroy();
|
Online::ProfileManager::destroy();
|
||||||
GUIEngine::DialogQueue::deallocate();
|
GUIEngine::DialogQueue::deallocate();
|
||||||
|
GUIEngine::clear();
|
||||||
|
GUIEngine::cleanUp();
|
||||||
|
GUIEngine::clearScreenCache();
|
||||||
if(font_manager) delete font_manager;
|
if(font_manager) delete font_manager;
|
||||||
|
|
||||||
// Now finish shutting down objects which a separate thread. The
|
// Now finish shutting down objects which a separate thread. The
|
||||||
|
Loading…
x
Reference in New Issue
Block a user