It is looking like i have a major memory leak in this little bit of javascript. I’m hoping someone might be able to point me in a direction to possibly be a little more memory efficient, and not cause browser crashes.
This javascript is running on a page that is up on a system constantly. It gets an applciation out of memory exception after about a week of continuous running.
Any suggestions for making this more efficient? What part of this is causing the leak?
setInterval("$.get('Dashboard.aspx', function (data)
{
$('#buildMonitorBody').html(data);
});"
, 300000);
As always, I appreciate any help that can be given.
From my understanding, web pages are not meant to stay open permanently – for such thing you have background processes or windows services.
If you do have to stick with this wrong approach, my tip would be to force reload every day with such code:
Hopefully reloading the page will release the memory reserved for the numerous timer calls.