Question

I am tasked with evaluating a legacy web application for potential memory leaks. While doing some learning steps with Chrome DevTools I ran into an odd behavior and wonder if someone would be able to explain.

My test page is a very simple document, just containing an iframe with an empty src attribute.

<!DOCTYPE html>
<html>
<head>
   <title>emty iframe test</title>
       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
       <style type="text/css">
        #report01 {
            background-color:red;
        }
       </style>
</head>
<body>
   <iframe id='report01' class='report' src='' width="1000" height="200"></iframe>
</body>
</html>

When running a memory timeline on that page while doing a refresh via context menu on the inner iframe only ("Reload frame"), I see a constant rising of the DOM document count as well as the DOM Node count.

I've manually GC'ed at the end of the timeline but the neither count would fall back to the starting value. I have caching disabled while DevTools are open to avoid issues in that regard. I also tried to apply the '3 snapshot' technique to find out what's happening but it gives me an empty result list.

So, why would the memory timeline counters increase while logically it shouldn't be possible to have anything leaking in this scenario?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top