summaryrefslogtreecommitdiff
path: root/s_expression.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-06-23s_symbol: Close memory leak of symbol name.Carl Worth1-2/+2
Easily done now that s_expression is allocated with talloc. Simply switch from new to talloc_strdup and the job is done. This closes the great majority (11263) of the remaining leaks in the glsl-orangebook-ch06-bump.frag test: total heap usage: 55,623 allocs, 55,546 frees (was 44,283 frees) This test is now 99.86% leak-free.
2010-06-23exec_node: Add new talloc-based new()Carl Worth1-8/+8
And fix all callers to use the tallbac-based new for exec_node construction. We make ready use of talloc_parent in order to get valid, (and appropriate) talloc owners for everything we construct without having to add new 'ctx' parameters up and down all the call trees. This closes the majority of the memory leaks in the glsl-orangebook-ch06-bump.frag test: total heap usage: 55,623 allocs, 42,672 frees (was 14,533 frees) Now 76.7% leak-free. Woo-hoo!
2010-06-23exec_node: Remove destructor from exec_node and all descendants.Carl Worth1-15/+0
Two of these destructors are non-empty, (s_symbol and s_list), so this commit could potentially introduce memory leaks, (though, no additional leaks are found in glsl-orangebook-ch06-bump.frag at least---perhaps the current code is never calling delete on these classes?). Going forward, we will switch to talloc for exec_node so we won't need explicit destrcutors to free up any memory used.
2010-04-28Add a simple S-Expression reader and printer.Kenneth Graunke1-0/+146