Reputation: 7814
I'm experiencing an increase of memory usage, when I use the jQuery-eventhandling in Chrome. I've tested it with IE and Firefox as well, but there I couldn't see a suspicious rise of memory-usage, compared to Chrome.
I'm using Chrome version 4.0.223.16 (unfortunately I'm forced to use this version, here)
Simple example here. Just scroll with the mousewheel in the red box and open the Chrome-taskmanager and you will see an increase of memory which won't be released anymore:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="js/libs/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
jQuery(function () {
jQuery("#div1").bind("mousewheel", function (event) {
event.preventDefault();
});
});
</script>
</head>
<body>
<div id="div1" style="width: 100px; height: 100px; background-color: red;"></div>
</body>
</html>
Does anyone have experienced the same problem (or is it maybe solved with a different version of Chrome)? And does anyone have a fix for it?
Upvotes: 2
Views: 840
Reputation: 630349
I can confirm this leaks some memory in chrome, even in the latest 5.0.356 developer build. However...I wouldn't worry about it. If you keep an eye on it, the garbage collector is cleaning it up about once every 60 seconds.
Upvotes: 2