I'm using the following pattern which is leaking memory in Firefox:
$(function() {
(function() {
var callee = arguments.callee;
$.ajax({
url: '...',
success: function() { ... setTimeout(callee, 1000); },
error: function() { ... setTimeout(callee, 1000); }
});
})();
});
The memory leak remains, even when success/error do nothing other than calling setTimeout again. I'm observing the leak via Windows Task Manager; if the page is left open, memory usage of firefox.exe slowly creeps up. For the final version of this code, I only need to update once a minute, but once-a-second demonstrates the memory leak much faster!
(Note: this looks like a very similar problem to this question, but the selected answer there doesn't appear to cater for Firefox)