history.js
history.js copied to clipboard
Memory Leak
I am noticing there is a memory leak when using this in Chrome Version 32.0.1700.76 m. This may be happening with other browsers aswell.
There is a timer running once every second and not being recycled. The script is pointing to this point
/**
* Bind for Saving Store
*/
if ( sessionStorage ) {
// When the page is closed
History.onUnload = function(){
any ideas?
I found this post b/c i discovered the same thing on my site when using this library.
Chrome 34.0.1847.116 m
IE 11.00.9600.16428
Worst part about this, is that its spiking so many of my CPU's cores, its affecting other programs on my computer, just in the slightest, but thats still unacceptable in my opinion.
This bug is occurring to me on all major versions of: Safari (7.0.5), FireFox (30.0), and Chrome (36.0.1985) for the jquery version.
Just noticed this happening... Since it really is unacceptable, I figured out a possible solution.
In history.js or bundled file, find the line:
History.intervalList.push(setInterval(History.onUnload,History.options.storeInterval));
replace it with:
History.isInternetExplorer() && History.intervalList.push(setInterval(History.onUnload,History.options.storeInterval));
this uses the built-in History.js IE check. I'm not sure whether or not this breaks anything, but it seems to have solved my issue.