[Mesa-dev] [PATCH] run: stop leaking SSO programs
Nicolai Hähnle
nhaehnle at gmail.com
Sat Dec 10 10:29:12 UTC 2016
On 10.12.2016 01:45, Timothy Arceri wrote:
> This was causing my poor 8GB laptop to run out on memory.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> ---
> run.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/run.c b/run.c
> index 08fd543..6d635c1 100644
> --- a/run.c
> +++ b/run.c
> @@ -670,7 +670,9 @@ main(int argc, char **argv)
> text[shader[i].length] = 0;
>
> const_text = text;
> - glCreateShaderProgramv(shader[i].type, 1, &const_text);
> + GLuint prog = glCreateShaderProgramv(shader[i].type, 1,
> + &const_text);
> + glDeleteProgram(prog);
> }
> } else if (type == TYPE_CORE || type == TYPE_COMPAT) {
> GLuint prog = glCreateProgram();
>
More information about the mesa-dev
mailing list