Merge "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);
|
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
|
// 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;
|
return nVerifiedCfgs;
|
||||||
}
|
}
|
||||||
@@ -308,6 +308,6 @@ FBConfig::FBConfig(EGLDisplay p_eglDpy, EGLConfig p_eglCfg)
|
|||||||
FBConfig::~FBConfig()
|
FBConfig::~FBConfig()
|
||||||
{
|
{
|
||||||
if (m_attribValues) {
|
if (m_attribValues) {
|
||||||
delete m_attribValues;
|
delete[] m_attribValues;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
void * alloc(size_t size) {
|
void * alloc(size_t size) {
|
||||||
if (m_bufferLen >= size) return (void *)(m_buffer);
|
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_bufferLen = size;
|
||||||
m_buffer = new unsigned char[m_bufferLen];
|
m_buffer = new unsigned char[m_bufferLen];
|
||||||
|
|||||||
Reference in New Issue
Block a user