Fix memory leak in EGL / GUI mode, resetSimulation with textures in GUI mode.

Fixes Issue #3285
This commit is contained in:
erwin coumans 2021-03-04 09:13:22 -08:00
parent adcaa75777
commit 3963f077fc

View File

@ -397,6 +397,15 @@ void GLInstancingRenderer::removeAllInstances()
m_graphicsInstances.clear();
m_data->m_publicGraphicsInstances.exitHandles();
m_data->m_publicGraphicsInstances.initHandles();
for (int i=0;i<m_data->m_textureHandles.size();i++)
{
InternalTextureHandle& h = m_data->m_textureHandles[i];
glDeleteTextures(1, &h.m_glTexture);
}
m_data->m_textureHandles.clear();
}
GLInstancingRenderer::~GLInstancingRenderer()