mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Plug the leaking CoglProgram and CoglShader
_cogl_program_free and _cogl_shader_free never freed the struct their structs so it would end up leaking a little bit.
This commit is contained in:
parent
f17717717a
commit
a639ed6593
@ -74,6 +74,8 @@ _cogl_program_free (CoglProgram *program)
|
||||
released! Do that separately before this! */
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
GE (glDeleteProgram (program->gl_handle));
|
||||
|
||||
g_slice_free (CoglProgram, program);
|
||||
}
|
||||
|
||||
CoglHandle
|
||||
|
@ -52,6 +52,8 @@ _cogl_shader_free (CoglShader *shader)
|
||||
released! Do that separately before this! */
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
glDeleteShader (shader->gl_handle);
|
||||
|
||||
g_slice_free (CoglShader, shader);
|
||||
}
|
||||
|
||||
CoglHandle
|
||||
|
@ -66,6 +66,8 @@ _cogl_program_free (CoglProgram *program)
|
||||
for (i = 0; i < COGL_GLES2_NUM_CUSTOM_UNIFORMS; i++)
|
||||
if (program->custom_uniform_names[i])
|
||||
g_free (program->custom_uniform_names[i]);
|
||||
|
||||
g_slice_free (CoglProgram, program);
|
||||
}
|
||||
|
||||
CoglHandle
|
||||
|
@ -46,6 +46,8 @@ _cogl_shader_free (CoglShader *shader)
|
||||
released! Do that separately before this! */
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
glDeleteShader (shader->gl_handle);
|
||||
|
||||
g_slice_free (CoglShader, shader);
|
||||
}
|
||||
|
||||
CoglHandle
|
||||
|
Loading…
Reference in New Issue
Block a user