Fixed memory leaks in gles

This commit is contained in:
Deve 2017-08-13 22:02:55 +02:00
parent 0bf0ca0a35
commit 71bbafadbd
2 changed files with 13 additions and 0 deletions

View File

@ -1218,6 +1218,9 @@ bool CIrrDeviceLinux::createInputContext()
return false;
}
// It's showed as memory leak, but we shouldn't delete it. From the xlib
// documentation: "The returned modifiers string is owned by Xlib and
// should not be modified or freed by the client."
char* p = XSetLocaleModifiers("");
if (p == NULL)
{

View File

@ -432,6 +432,13 @@ namespace video
addAndDropMaterialRenderer(new COGLES2ParallaxMapRenderer(PMVSData, PMFSData, EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA, this));
addAndDropMaterialRenderer(new COGLES2FixedPipelineRenderer(FPVSData, FPFSData, EMT_ONETEXTURE_BLEND, this));
delete[] FPVSData;
delete[] FPFSData;
delete[] NMVSData;
delete[] NMFSData;
delete[] PMVSData;
delete[] PMFSData;
// Create 2D material renderer.
@ -476,6 +483,9 @@ namespace video
R2DFSFile->drop();
MaterialRenderer2D = new COGLES2Renderer2D(R2DVSData, R2DFSData, this);
delete[] R2DVSData;
delete[] R2DFSData;
}