forked from Mirrorlandia_minetest/minetest
Fix small memory leaks on shutdown
This commit is contained in:
parent
ef8cdd890c
commit
e81454fb38
@ -205,8 +205,9 @@ GUIEngine::GUIEngine( irr::IrrlichtDevice* dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_menu->quitMenu();
|
m_menu->quitMenu();
|
||||||
m_menu->drop();
|
m_menu->remove();
|
||||||
m_menu = 0;
|
delete m_menu;
|
||||||
|
m_menu = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -279,8 +280,6 @@ GUIEngine::~GUIEngine()
|
|||||||
m_sound_manager = NULL;
|
m_sound_manager = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: clean up m_menu here
|
|
||||||
|
|
||||||
infostream<<"GUIEngine: Deinitializing scripting"<<std::endl;
|
infostream<<"GUIEngine: Deinitializing scripting"<<std::endl;
|
||||||
delete m_script;
|
delete m_script;
|
||||||
|
|
||||||
|
@ -102,6 +102,11 @@ GUIFormSpecMenu::GUIFormSpecMenu(irr::IrrlichtDevice* dev,
|
|||||||
GUIFormSpecMenu::~GUIFormSpecMenu()
|
GUIFormSpecMenu::~GUIFormSpecMenu()
|
||||||
{
|
{
|
||||||
removeChildren();
|
removeChildren();
|
||||||
|
|
||||||
|
for (u32 i = 0; i < m_tables.size(); ++i) {
|
||||||
|
GUITable *table = m_tables[i].second;
|
||||||
|
table->drop();
|
||||||
|
}
|
||||||
|
|
||||||
delete m_selected_item;
|
delete m_selected_item;
|
||||||
|
|
||||||
|
@ -98,6 +98,8 @@ GUITable::~GUITable()
|
|||||||
|
|
||||||
if (m_font)
|
if (m_font)
|
||||||
m_font->drop();
|
m_font->drop();
|
||||||
|
|
||||||
|
m_scrollbar->remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
GUITable::Option GUITable::splitOption(const std::string &str)
|
GUITable::Option GUITable::splitOption(const std::string &str)
|
||||||
|
Loading…
Reference in New Issue
Block a user