I have a pure HTML file with a requestAnimationFrame loop that absolutely does not process. However, if you look at the memory consumption in Chrome DevTools, I see that the used memory is constantly increasing, and the garbage collector works every few seconds to collect about 1 megabyte of garbage data.
So where does the memory leak come from?
What my memory usage looks like:

And here is my code:
<!DOCTYPE html>
<html>
<head lang="en">
<title></title>
<script>
function update() {
window.requestAnimationFrame(update);
}
update();
</script>
</head>
<body>
</body>
</html>
Run codeHide result
source
share