RALOVICH wrote:
This patch plugs a leak triggerable by display lists. I am not familiar with this part of mesa, maybe there are better ways to do this, in that case regard the patch as a pointer to the problem.Tested and works with sauerbraten and gears. Please review!
Here's my fix for the leak. We want to free the node's current data when the node is destroyed, not during display list construction.
Please test with your app(s) and let me know. -Brian
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index f8e46ff..d00d304 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1144,6 +1144,11 @@ static void vbo_destroy_vertex_list( GLcontext *ctx, void *data ) if ( --node->prim_store->refcount == 0 ) FREE( node->prim_store ); + + if (node->current_data) { + FREE(node->current_data); + node->current_data = NULL; + } }
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev