From 17374f84814bd0398b7d9f10fe6c3f517a0762df Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Wed, 16 Nov 2011 16:41:46 -0800 Subject: Fix one memory leak only in DEBUG mode We should always delete the temporary pixels. Change-Id: Idc4cf939cf3a50ddb557d544deb911c64b0547df --- Source/WebCore/platform/graphics/android/GLUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/WebCore') diff --git a/Source/WebCore/platform/graphics/android/GLUtils.cpp b/Source/WebCore/platform/graphics/android/GLUtils.cpp index d1fe51a..1b816f2 100644 --- a/Source/WebCore/platform/graphics/android/GLUtils.cpp +++ b/Source/WebCore/platform/graphics/android/GLUtils.cpp @@ -370,6 +370,9 @@ GLuint GLUtils::createBaseTileGLTexture(int width, int height) GLUtils::checkGlError("glTexImage2D"); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); +#ifdef DEBUG + delete pixels; +#endif return texture; } -- cgit v1.1