Skip to content

Find memory leaks

Milten repeats website navigation and finds objects retained after returning to the starting page. The report shows what accumulates and how much memory use grows.

Report fragment

See which group grows between iterations

Illustrative navigation and return example. These values explain the report and are not results from your site.

Route change

/catalog → /product → /catalog × 5

The navigation has finished, but state objects from the previous page remain in memory. Their count increases with each repetition. Investigate which references retain them.

Object route view models
Before → after
846 → 1451
Delta
+605
Delta / iteration
+121
Set<observerTarget>
Before → after
34 → 74
Delta
+40
Delta / iteration
+8
native memory
Before → after
41.2 → 54.7 MB
Delta
+13.5 MB
Delta / iteration
+2.7 MB

Illustrative data to explain the report. Your page results appear after a scan.

How it works

We repeat a scenario and count delta between passes

Scenario

Choose links on the page

The scanner finds up to three visible internal links. It repeats each navigation and return to the starting page five times.

Delta

Compare memory use

After a warm-up pass, we measure memory retained after repeated navigation. This reveals accumulation that is not visible on the first load.

Growth groups

Show what accumulates

The report lists growing collections, event listeners, DOM nodes and object types. For collections, it also shows where the code changed them when that information is available.

Analysis modules

What goes into the memory leak report

Scenario

Checked scenario

The report stores the URL, checked user path, iteration count, and leak flag so the finding can be reproduced.

leakURLiterations
Delta

Total memory growth

Compare total growth and growth per iteration for the same navigation. Accumulation is a reason to inspect retained objects; intended caches and application state can also keep memory in use.

total deltaper iterationmemory stats
Collections

Array, Map, Set, Object

Growing collections are listed separately: size before and after, delta, delta per iteration, and stack traces where the collection changed.

MapObjectstacktrace
Listeners

Event listeners and nodes

The report shows listener counts before and after the scenario, resulting delta, and leaking listener nodes where subscriptions grow.

before / afternode deltaper iter
DOM

DOM node growth

The report shows DOM node growth and leaking node descriptions, making detached DOM or repeated interface initialization easier to find.

node countdescriptiondetached
Heap objects

Heap object types

For growing object types, the report includes count delta, size delta, retained size delta, and per-iteration values. When environment data exists, total, native, and V8 heap are shown separately.

count deltasize deltaretained
FAQ

Frequently asked questions about memory leaks

Short answers about delta per iteration, growing collections, listeners, DOM nodes, and what to do after the report.

Is every increase in memory a leak?
No. An application may keep data it still needs. The scanner looks for accumulation during repeated navigation, but cannot know which data your application needs. Check what retains the objects and whether they should be released after returning.
What are detached DOM nodes?
These are elements removed from the document but retained in memory through JavaScript references. For example, a closed dialog may still have a reference to its element. Node descriptions narrow the search; verify the retaining reference in your code.
Can the check find event listener leaks?
Yes. The report shows listener counts before and after, total delta, delta per iteration, and leaking listener nodes with node count delta. This helps distinguish a one-time subscription from handlers added on every repeat.
Which pages and actions does the scanner check?
The check targets SPAs with navigation that does not reload the whole page. The scanner chooses up to three visible internal links and repeats navigation and return. Forms, search and opening dialogs are not checked separately. If no suitable links exist, the check fails; that does not mean there are no leaks.
What should I do after finding a leak?
Repeat the reported navigation. If listener counts rise on every return, locate where the component adds them and whether cleanup runs. Inspect retaining references rather than relying on the leak flag alone. After a fix, compare the same path and iteration count.
Cookies

We use cookies

We use cookies to give you a better experience on our site. You can learn more about how we use cookies in our privacy policy.