Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time. Cannot retrieve contributors at this time
31 lines (29 sloc) 701 Bytes
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h4>Memory Leak Demo 3</h4>
<button onclick="start()">Start</button>
<div id="p"></div>
<script type="text/javascript">
function start() {
var p = document.getElementById("p");
detached = document.createElement("div");
p.appendChild(detached);
p.removeChild(detached);
fill();
}
function fill() {
for (var i = 0; i < 25; ++i) {
var div = document.createElement('div');
div.data = new Array(10000);
for (var j = 0, l = div.data.length; j < l; ++j) {
div.data[j] = j.toString();
}
detached.appendChild(div);
}
}
</script>
</body>
</html>
You can’t perform that action at this time.