Fix memory leak

This commit is contained in:
Benau 2016-04-30 07:00:24 +08:00
parent 0449263b6e
commit 56549f68d4
2 changed files with 9 additions and 2 deletions

View File

@ -60,6 +60,13 @@ MaterialManager::~MaterialManager()
delete m_materials[i];
}
m_materials.clear();
for (std::map<video::E_MATERIAL_TYPE, Material*> ::iterator it =
m_default_materials.begin(); it != m_default_materials.end(); it++)
{
delete it->second;
}
m_default_materials.clear();
} // ~MaterialManager
//-----------------------------------------------------------------------------

View File

@ -954,9 +954,9 @@ namespace GUIEngine
//if (g_skin != NULL) delete g_skin;
g_skin = NULL;
g_ft_env->~FTEnvironment();
delete g_ft_env;
g_ft_env = NULL;
g_gp_creator->~GlyphPageCreator();
delete g_gp_creator;
g_gp_creator = NULL;
for (unsigned int i=0; i<g_loaded_screens.size(); i++)