I'm seeing the same problem described in Memory Leak When Pulling JSON from WEB.
I simply have a function that makes a jsonp ajax request periodically. My function is called by another function triggered by a setInterval.
I see a memory leak in all broswers that I've tried, IE, Safari, FireFox. Something I see in the Safari script debugger is that each response to an ajax request is listed as a script in the drop down list in the script debugger window, as if there is some kind of script object not getting cleaned up.
I'm using jquery 1.6.2. It is a "long term" leak, not cleaned up after running for several minutes.
Any ideas what is causing this?
request: function ()
{
$.ajax({
url: <myurl>
dataType: "jsonp",
jsonp: "jsoncallback",
timeout: 5000,
cache: false,
beforeSend: function (xhr)
{
},
success: function (data, status, xhr)
{
},
error: function (xhr, status, error)
{
},
complete: function (req, status)
{
}
});
}
...
setInterval(request, 100);