I'm developing the extension that requests certain page from Facebook
at specified interval. After about the 20 minutes the memory usage
rises very high. I isolated the problem to the ajax call causing it
and checked it in simple extension that doesn't parse data or
anything, just makes request. The problem still exists.
Anyone sees if there could be somewhere a memory leak? I suppose that
chrome just keeps the loaded data somewhere in memory and don't
release them. (i've also tried launching this code with the newest
jQuery ( $.get(); ), but the problem is the same. Anyone can help?
function read()
{
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4)
{
setTimeout(read, 5000);
}
}
xhr.open("GET", '
http://www.facebook.com/reqs.php', true);
xhr.send();
}
read();