HUGE memory leak somewhere

There seems to be a huge memory leak somewhere, at least on ST3 (haven't tried ST2). I seem to be able to reproduce it simply by opening the history and opening a few files a couple of times, and then simply opening and closing the history panel. You will notice it get slower each time and memory usage sharply increases.
I think this should be set before opening the panel, just to be save, but it will hardly matter.