summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Turner <digit@android.com>2011-08-10 01:09:48 -0700
committerAndroid Code Review <code-review@android.com>2011-08-10 01:09:48 -0700
commit6bb9511365bb64772e35b8b7bfbb0fdbabb0cec4 (patch)
tree5e71fb4b4792ac877948db024930c03c74bf73d6
parent5bc21905be68131bf911ad62ee1fa1d8dc759487 (diff)
parent5018365268fb5baacc38ca6587904852d77fd4af (diff)
Merge "opengles emulator: GLES memory leaks"
-rw-r--r--tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp6
-rw-r--r--tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp b/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp
index 7c8edc0f6..dc8517c6c 100644
--- a/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp
+++ b/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp
@@ -261,7 +261,7 @@ int FBConfig::chooseConfig(FrameBuffer *fb, EGLint * attribs, uint32_t * configs
s_egl.eglChooseConfig(dpy, newAttribs, matchedConfigs, nConfigs, &nConfigs);
- delete newAttribs;
+ delete[] newAttribs;
//
// From all matchedConfigs we need only config_size FBConfigs, so we intersect both lists compating the CONFIG_ID attribute
@@ -284,7 +284,7 @@ int FBConfig::chooseConfig(FrameBuffer *fb, EGLint * attribs, uint32_t * configs
}
}
- delete matchedConfigs;
+ delete[] matchedConfigs;
return nVerifiedCfgs;
}
@@ -308,6 +308,6 @@ FBConfig::FBConfig(EGLDisplay p_eglDpy, EGLConfig p_eglCfg)
FBConfig::~FBConfig()
{
if (m_attribValues) {
- delete m_attribValues;
+ delete[] m_attribValues;
}
}
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h
index 7b8223d40..1a18f473f 100644
--- a/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h
+++ b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h
@@ -32,7 +32,7 @@ public:
void * alloc(size_t size) {
if (m_bufferLen >= size) return (void *)(m_buffer);
- if (m_buffer != NULL) delete m_buffer;
+ if (m_buffer != NULL) delete[] m_buffer;
m_bufferLen = size;
m_buffer = new unsigned char[m_bufferLen];