Fix some leaking when switching resolution
This commit is contained in:
parent
157faaf616
commit
262337bc13
@ -156,10 +156,6 @@ IrrDriver::~IrrDriver()
|
|||||||
#ifdef ENABLE_RECORDER
|
#ifdef ENABLE_RECORDER
|
||||||
ogrDestroy();
|
ogrDestroy();
|
||||||
#endif
|
#endif
|
||||||
assert(m_device != NULL);
|
|
||||||
m_device->drop();
|
|
||||||
m_device = NULL;
|
|
||||||
m_modes.clear();
|
|
||||||
STKTexManager::getInstance()->kill();
|
STKTexManager::getInstance()->kill();
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
if (CVS->isGLSL())
|
if (CVS->isGLSL())
|
||||||
@ -169,6 +165,10 @@ IrrDriver::~IrrDriver()
|
|||||||
#endif
|
#endif
|
||||||
delete m_wind;
|
delete m_wind;
|
||||||
delete m_renderer;
|
delete m_renderer;
|
||||||
|
assert(m_device != NULL);
|
||||||
|
m_device->drop();
|
||||||
|
m_device = NULL;
|
||||||
|
m_modes.clear();
|
||||||
} // ~IrrDriver
|
} // ~IrrDriver
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -969,12 +969,14 @@ void destroy()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPTextureManager::destroy();
|
g_dy_dc.clear();
|
||||||
for (auto& p : g_shaders)
|
for (auto& p : g_shaders)
|
||||||
{
|
{
|
||||||
delete p.second;
|
delete p.second;
|
||||||
}
|
}
|
||||||
g_shaders.clear();
|
g_shaders.clear();
|
||||||
|
|
||||||
|
SPTextureManager::destroy();
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
|
|
||||||
#ifndef USE_GLES2
|
#ifndef USE_GLES2
|
||||||
|
Loading…
Reference in New Issue
Block a user