GraphicSystems: fixed memory leaks
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Thu, 10 May 2012 10:53:03 +0000 (12:53 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Thu, 10 May 2012 10:53:03 +0000 (12:53 +0200)
new var[] must be delete with delete[] operator.

LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp
LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLXGraphicSystem.cpp

index 8799f69..94456da 100644 (file)
@@ -369,7 +369,7 @@ void GLESGraphicsystem::renderSurface(Surface* surface)
         LOG_ERROR("GLESGraphicsystem", "GL Error occured :" << glErrorCode );
     };
 
-    delete textureCoordinates;
+    delete[] textureCoordinates;
 }
 
 bool GLESGraphicsystem::initOpenGLES(EGLint displayWidth, EGLint displayHeight)
index ca8c556..d70c92e 100644 (file)
@@ -369,7 +369,7 @@ void GLXGraphicsystem::renderSurface(Surface* currentSurface)
     };    
     currentSurface->frameCounter++;    
     currentSurface->drawCounter++;    
-    delete textureCoordinates;
+    delete[] textureCoordinates;
 }
 
 void GLXGraphicsystem::saveScreenShotOfFramebuffer(std::string fileToSave)