Fix a memory leak in OpenCL
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5044 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c9b7f67c3a
commit
0ab6c117c1
|
@ -91,6 +91,14 @@ void TexDecoder_OpenCL_Initialize() {
|
||||||
|
|
||||||
void TexDecoder_OpenCL_Shutdown() {
|
void TexDecoder_OpenCL_Shutdown() {
|
||||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL && !defined(DEBUG_OPENCL)
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL && !defined(DEBUG_OPENCL)
|
||||||
|
|
||||||
|
clReleaseProgram(g_program);
|
||||||
|
int i = 0;
|
||||||
|
while(strlen(Decoders[i].name) > 0)
|
||||||
|
{
|
||||||
|
clReleaseKernel(Decoders[i].kernel);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
if(g_clsrc)
|
if(g_clsrc)
|
||||||
clReleaseMemObject(g_clsrc);
|
clReleaseMemObject(g_clsrc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue