My web application has been leaking memory so I created a test webpage to see if I could find out what was actually leaking. So I have arrived at this simple piece of code that can rise to about 300mb of memory usage very quickly.
In Chrome the same code doesnt seem to leak as memory usage drops significantly once GC has run. In FF4 (Windows 7) the memory usage never seems to drop, even once the code has finished running.
What is causing the memory leak here or is it a FF4 issue (I have noticed a few)?
Note: I am using jQuery 1.5 and am running in Safe Mode with all addons disabled.
$.ajaxSetup ({
cache: false
});
var counter = 0;
ajaxTest();
function ajaxTest()
{
$.ajax({
type: "GET",
url: "/web/data/data.xml",
dataType: "xml",
success: function(xml) {
$("#counter").text(++counter);
xml = null;
if (counter < 2000)
setTimeout(ajaxTest,25);
}});
}