Hello,
I have serve a page of data on my intranet that's updated frequently using ajax. Everything is great except that my memory usage climbs higher and higher until the page freezes (in IE 6, 7, and 8 but not in Firefox). I ran it in several leak detection utilities and they all indicated no memory leaks. By disabling elements of the Javascript and removing functions, I have isolated the problem to this piece of script:
--------------------------------------------------------
function ajaxTrigger(url) {
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(url);
}
if (x) { // got something back
x.onreadystatechange = function() {
//main fuction goes here
}
x.open("GET", url, true);
x.send(null);
if ( (maxupdates == 0) || (updates < maxupdates-1)) {
setTimeout("ajaxTrigger(flashFile + '?' + new Date().getTime())", reloadTime);
}
}
}
--------------------------------------------------
Is there anything in the above script that jumps out as something that would prevent memory from being released? Let me know if any other information is needed, any and all responses will be greatly appreciated.
I have serve a page of data on my intranet that's updated frequently using ajax. Everything is great except that my memory usage climbs higher and higher until the page freezes (in IE 6, 7, and 8 but not in Firefox). I ran it in several leak detection utilities and they all indicated no memory leaks. By disabling elements of the Javascript and removing functions, I have isolated the problem to this piece of script:
--------------------------------------------------------
function ajaxTrigger(url) {
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(url);
}
if (x) { // got something back
x.onreadystatechange = function() {
//main fuction goes here
}
x.open("GET", url, true);
x.send(null);
if ( (maxupdates == 0) || (updates < maxupdates-1)) {
setTimeout("ajaxTrigger(flashFile + '?' + new Date().getTime())", reloadTime);
}
}
}
--------------------------------------------------
Is there anything in the above script that jumps out as something that would prevent memory from being released? Let me know if any other information is needed, any and all responses will be greatly appreciated.