From: sapier Date: Fri, 20 Jun 2014 17:50:47 +0000 (+0200) Subject: Fix small memory leaks on shutdown X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=e81454fb387cd98b4a63ade83a9eb41f1bdca278;p=zefram%2Fminetest%2Fminetest_engine.git Fix small memory leaks on shutdown --- diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp index 671f0c57..34bdaffa 100644 --- a/src/guiEngine.cpp +++ b/src/guiEngine.cpp @@ -205,8 +205,9 @@ GUIEngine::GUIEngine( irr::IrrlichtDevice* dev, } m_menu->quitMenu(); - m_menu->drop(); - m_menu = 0; + m_menu->remove(); + delete m_menu; + m_menu = NULL; } /******************************************************************************/ @@ -279,8 +280,6 @@ GUIEngine::~GUIEngine() m_sound_manager = NULL; } - //TODO: clean up m_menu here - infostream<<"GUIEngine: Deinitializing scripting"<drop(); + } delete m_selected_item; diff --git a/src/guiTable.cpp b/src/guiTable.cpp index 5febb837..4d6fc195 100644 --- a/src/guiTable.cpp +++ b/src/guiTable.cpp @@ -98,6 +98,8 @@ GUITable::~GUITable() if (m_font) m_font->drop(); + + m_scrollbar->remove(); } GUITable::Option GUITable::splitOption(const std::string &str)