This project is archived and is in readonly mode.

Memory leak with request class
Reported by Chris de Kok | September 26th, 2011 @ 02:49 PM
There is still a memory leak in 1.4.0 pretty much the same as ticket: https://mootools.lighthouseapp.com/projects/2706/tickets/1123-memor...
Which is closed already
Example, load a big file in form.htm! and click a few times the memory will only go up as in the screenshot, this will happen in all browsers not only IE is just test on IE with the CollectGarbage method.
The leak is in Request too btw so every ajax request will suffer!
<!DOCTYPE html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="mootools-core-1.4.0-full-compat.js"></script>
<script type="text/javascript">
window.addEvent('domready', function() {
var ajaxContent = $('AjaxContent');
$('loadAjax').addEvent('click', function(e){
var options = {
url: 'form.html',
evalScripts: true,
update: ajaxContent,
onSuccess: function(){
CollectGarbage();
}
}
var xhr = new Request.HTML(options);
xhr.send();
return false;
});
});
</script>
</head>
<body>
<a href="" id="loadAjax">AJAX REQUEST</a>
<div id="AjaxContent">
</div>
</body>
Comments and changes to this ticket
-
Chris de Kok September 27th, 2011 @ 09:15 AM
I tested some more and if i use the normal Request class and update with the onsuccess it does not leak memory, but when I use Request.HTML update property it will leak :(
-
ibolmo January 19th, 2012 @ 10:25 AM
- State changed from new to invalid
Moved to Github Issues: https://github.com/mootools/mootools-core/issues/2243
Please use Github Issues, since Lighthouse has been deprecated.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »