Skip to main content

Bug Tracker

Side navigation

Ticket #5285: jquery_memleak.html


File jquery_memleak.html, 0.5 KB (added by EliAndrewC, September 23, 2009 02:22PM UTC)

Standalone html file which demonstrates this memory leak. I refer to the googleapi jquery.min.js to avoid having to attach it, but I did test with the latest jQuery (1.3.2)

<html>
<head>
    <title>Demo of jQuery Memory Leak in IE</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
    function resetContent() {
        $("#content div").remove();
        for(var i=0; i<1000; i++) {
            $("#content").append("<div>Hello World!</div>");
        }
        setTimeout(resetContent, 2000);
    }
    $(resetContent);
</script>
<div id="content"></div>
</body>
</html>

Download in other formats:

Original Format