How to stop IE $.getJSON() memory leak
Hello,
I have started using jQuery recently and I am having a problem with IE leaking memory when performing a $.getJSON() request at intervals. To test the problem I set up the code to run every second. The only code I currently have running is the ajax request as below:
getDetail = function(detailID){
$.ajaxSetup({ cache: false });
$.getJSON("api/urlgoeshere", {"dID" : detailID,"d" : 0},
function(data){
//Do stuff when leak is fixed
//Reset the timer
setInterval('getDetail('+ data.result.id +')', 1000);
});
}
If I leave the above running the Memory Usage climbs by about 5mb a minute in IE but is ok in Firefox. I am using jquery-1.4.2. Has anyone come across this before?
Cheers
Mark