I run heavy JavaScript every 5 seconds and task manager shows constant increase of memory usage. However Heap snapshot doesn't. If I stop the script, memory is cleared after about half a minute two minutes.
UPDATE:
If I leave the script for a long time, the memory increases until the browser crashes. I also tried to run timeline test of chrome dev tools, and they also don't show the increase of memory usage, same as Heap snapshot. So I guess it's some kind of a leak, but I can't understand what is leaking.
Another thing which I can't confirm, as I can't install previous Chrome versions is that I don't remember this happening on previous (<24 Chrome versions). And IE10 runs this test without increasing memory. Could this be issue of new Chrome?
Assuming you are referring to the Chrome Developer Tools, you might not be seeing the memory increase in the Heap snapshot, because the Heap snapshot profiler runs the Garbage Collector before the snapshot.
Seeing increased memory usage, especially during active processing, is quite normal. The garbage collector doesn't run unnecessarily. If your machine has memory to spare, it'll let the reserved memory grow. If you start pushing the limit of free memory, the collector should run. You should allow this to happen to see if it does.
Since you report that the memory goes down to it's original level after an idle period, that indicates that there is no memory leak, and the garbage collector is able to collect all allocated heap objects correctly.
However, IANAGE (I am not a Google engineer). I recommend reading the Heap Profiler documentation and the associated Memory 101 page for background.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With