glsl-optimizer icon indicating copy to clipboard operation
glsl-optimizer copied to clipboard

memory leak at opt_vector_splitting.cpp

Open crazii opened this issue 9 years ago • 1 comments

src\glsl\opt_vector_splitting.cpp : 274 loop_state* ls = analyze_loop_variables(instructions);

object "ls" is created and never deleted

crazii avatar Mar 22 '15 10:03 crazii

Thanks for posting this!!

I came across this leak as well, but wasn't finding it easy to track down. I was about to give up when I came across your post!

For others who are interested, this leak can be fixed by adding:

delete loopstate;

before the return statement in the ir_vector_reference_visitor::get_split_list() function.

I can make a pull request out of this if it would be helpful, but the change is trivial.

Thanks...

...Bill

billhollings avatar Apr 01 '15 00:04 billhollings