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:
Neil Roberts 2010-07-22 16:58:23 +01:00
parent f17717717a
commit a639ed6593
4 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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