Memory leak fix

This fixes the chart memory leak for me.  Sorry about the first line edit.  My text editor removed a strange, nonprintable character that was hiding in there.