浏览代码

Decrement the context's refcounts on part-used storage structs on

context destroy.  Fixes memory leak.
tags/mesa_6_3_2
Keith Whitwell 20 年前
父节点
当前提交
c91720fb1a
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11
    1
      src/mesa/tnl/t_save_api.c

+ 11
- 1
src/mesa/tnl/t_save_api.c 查看文件

@@ -1708,5 +1708,15 @@ void _tnl_save_init( GLcontext *ctx )
*/
void _tnl_save_destroy( GLcontext *ctx )
{
(void) ctx;
TNLcontext *tnl = TNL_CONTEXT(ctx);

/* Decrement the refcounts. References may still be held by
* display lists yet to be destroyed, so it may not yet be time to
* free these items.
*/
if ( --tnl->save.prim_store->refcount == 0 )
FREE( tnl->save.prim_store );

if ( --tnl->save.vertex_store->refcount == 0 )
FREE( tnl->save.vertex_store );
}

正在加载...
取消
保存