am 6bb95113: Merge "opengles emulator: GLES memory leaks"
* commit '6bb9511365bb64772e35b8b7bfbb0fdbabb0cec4': opengles emulator: GLES memory leaks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user