Close memory leaks in glsl_type (constructor and get_array_instance)
authorCarl Worth <cworth@cworth.org>
Sat, 19 Jun 2010 00:52:59 +0000 (17:52 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 24 Jun 2010 02:00:42 +0000 (19:00 -0700)
commit12c411504ca86341f8b96c349c15413ee198cc71
treeb6b00d8e7c8789b34d1e0f5686959dc95571b93f
parentdc5811fd0c7600b165ddd4e04a0ccae69bb19ec8
Close memory leaks in glsl_type (constructor and get_array_instance)

Add a talloc ctx to both get_array_instance and the glsl_type
constructor in order to be able to call talloc_size instead of
malloc.

This fix now makes glsl-orangebook-ch06-bump.frag 99.99% leak free:

total heap usage: 55,623 allocs, 55,615

Only 8 missing frees now.
ast_function.cpp
ast_to_hir.cpp
glsl_types.cpp
glsl_types.h
ir_reader.cpp
ir_variable.cpp