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.
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ read_type(_mesa_glsl_parse_state *st, s_expression *expr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return glsl_type::get_array_instance(base_type, size->value());
|
||||
return glsl_type::get_array_instance(st, base_type, size->value());
|
||||
} else if (strcmp(type_sym->value(), "struct") == 0) {
|
||||
assert(false); // FINISHME
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user