gallium: release textures during context tear-down (fix mem leak)

This commit is contained in:
Brian Paul 2008-05-16 16:04:30 -06:00
parent f8dce51083
commit 87afc9bcad
1 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,10 @@ static void st_destroy_context_priv( struct st_context *st )
_vbo_DestroyContext(st->ctx);
for (i = 0; i < Elements(st->state.sampler_texture); i++) {
pipe_texture_reference(&st->state.sampler_texture[i], NULL);
}
for (i = 0; i < Elements(st->state.constants); i++) {
if (st->state.constants[i].buffer) {
pipe_reference_buffer(st->pipe, &st->state.constants[i].buffer, NULL);