What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A high memory reading is not, by itself, proof of a leak. Reproduce the same automation cycle, measure the same process at equivalent points, and compare what remains after normal cleanup. Then follow retained objects to the code that owns them, fix that lifecycle, and repeat the workload to confirm the growth has stopped.
What counts as a browser automation memory leak?
Memory growth can come from several places: JavaScript running in a page, the Node.js process driving the automation, browser subprocesses, native allocations, or the combined process footprint. These are different diagnostic scopes. A page heap snapshot cannot explain every browser process, and a Node.js heap statistic does not describe page JavaScript.
As an Amazon Associate I earn from qualifying purchases.
Temporary peaks and intentional caches are not necessarily leaks. Look for repeatable accumulation across equivalent runs: objects or resources that should have been released remain reachable, or the relevant process’s memory trend continues to rise under the same workload. No universal memory threshold proves a leak; interpret measurements in the context of your workload and runtime.
Free tools Windows power users keep installed
One-click scans. No signup required.
Build a repeatable reproduction
- Choose one reproducing workflow. Use the same test or automation cycle each time, including the same pages, actions, and data volume.
- Hold the environment steady. Record browser and automation-library versions, worker count, and relevant test data. Avoid comparing runs with different concurrency or workload sizes.
- Measure at consistent points. For example, record after setup, after the repeated action, and after teardown. Allow the workflow’s ordinary cleanup and settling period before the final observation.
- Repeat several times. Compare the trend across cycles rather than treating one transient peak or isolated reading as evidence.
Keep a small log of timestamp, cycle number, process or memory domain, and measurement. This makes it easier to distinguish growth during one action from accumulation across completed cycles or a peak-concurrency effect.
#1 Best Overall
Find which process or memory domain is growing
Page JavaScript: Chrome DevTools Memory
When the page’s JavaScript heap appears to grow, use Chrome DevTools’ Memory tools to record heap snapshots. A snapshot represents reachable JavaScript objects at a point in time; it is not a complete accounting of native allocations or every browser process. Chrome’s Memory panel overview describes the available profiling modes.
Take a baseline snapshot, run the same action or cycle, let normal cleanup occur, and capture another snapshot under comparable conditions. In the Summary view, inspect object types and counts. Use Comparison to examine differences between snapshots, including surviving objects and freed memory. Chrome documents that snapshot capture begins with garbage collection, but consistent timing and workload still matter. See Record heap snapshots.
Node.js runner: V8 heap and process memory
If the automation runner is Node.js, measure its V8 heap separately from process-level memory. The V8 API exposes values such as used_heap_size, total_heap_size, and external_memory; process RSS includes memory beyond the V8 heap. A rising RSS value with a stable V8 heap does not establish a JavaScript object leak. It points the investigation toward native allocations, browser subprocesses, or other memory outside that V8 heap.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #2
Node’s V8 API documentation describes heap statistics and writeHeapSnapshot(). A snapshot applies to one V8 isolate. If the application uses worker threads, each worker isolate needs its own capture to inspect its heap.
Browser subprocesses and overall RSS
If page snapshots and the runner’s V8 heap do not explain the observed increase, identify which operating-system process is growing before labeling it a JavaScript leak. Browser subprocesses and native memory may contribute to RSS without appearing as retained JavaScript objects in the page or runner heap you inspected. Record the memory domain alongside every measurement so unlike values are not compared as though they described the same heap.
Read snapshots for retaining references
A credible leak signal is repeatable growth in objects that should have been released, together with a retaining path showing why they remain reachable. In Chrome DevTools, inspect the path from an object to its retaining reference and identify the owner that keeps it alive. The Chrome guide to fixing memory problems covers detached DOM trees and retaining references.
Rank #3
Detached DOM nodes
A node removed from the document can remain in memory if JavaScript still holds a reference to it. Check closures, global variables, collections, and event handlers that may keep detached nodes alive. Follow the retaining path to the code or object that owns the reference, then release it when that owner’s work is finished.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsAutomation lifecycle and accumulated data
Review code that repeatedly creates pages or explicitly created browser contexts, registers listeners, or stores per-cycle data. Arrays, logs, response bodies, screenshots, traces, and caches are useful places to investigate if they grow with each iteration. These are hypotheses to verify in your own code, not a universal explanation for Playwright memory growth.
Playwright documents page event listener operations in its Page API. Its Browser API explains closing contexts before the browser when you need graceful page closure and close events. Match cleanup to ownership: a component that registers a listener should remove it when it is done, and code that explicitly creates a context should close it at the end of its intended lifetime.
Rank #4
Fix the owner’s cleanup and verify the result
- Remove obsolete references. Clear or release references to objects, detached elements, or per-run data once their owner no longer needs them. Preserve data that is intentionally shared.
- Unsubscribe listeners. Remove listeners when the component or page that owns them is finished, especially if registration happens repeatedly.
- Close resources you created. Ensure pages and explicitly created browser contexts are closed as part of teardown. Put cleanup on a path that also runs when a test fails, such as the project’s fixture teardown or a
finallyblock. - Bound intentional retention. If a cache or history must persist, define its intended size and lifetime rather than allowing unbounded accumulation.
- Repeat the original reproduction. Measure the same process or heap at the same points and compare equivalent snapshots. The fix is supported when the suspected retained-object growth stops and the relevant memory trend stabilizes under those conditions.
Increasing a memory limit may postpone a failure, but it does not change what retains memory. Treat it as a capacity decision, not proof that a leak has been fixed.
Node.js heap snapshots: impact and safe use
writeHeapSnapshot() creates a snapshot that can be opened with tools such as Chrome DevTools, but capture has a meaningful runtime cost. It is synchronous and blocks the event loop; it captures one V8 isolate; and Node warns that snapshot creation needs memory of about twice the heap size at capture time. On a constrained machine, that extra requirement can cause an out-of-memory termination.
Capture in a controlled environment with sufficient memory headroom. Avoid treating snapshot creation as a harmless production diagnostic, and capture worker isolates separately when they are part of the suspected growth.
Best Value
Troubleshoot common misleading signals
- One measurement is high, but later readings fall. A single peak cannot establish a leak. Repeat the same cycle and compare memory after equivalent cleanup points.
- RSS rises while Node’s V8 heap stays level. RSS covers more than the V8 heap. Investigate native allocations, browser subprocesses, or other process memory instead of assuming page or runner objects are leaking.
- Snapshots differ, but the workload also changed. Different data volume, browser version, worker count, or timing makes the comparison inconclusive. Stabilize those conditions and recapture.
- Detached nodes appear in a snapshot. Their presence alone does not identify the bug. Inspect the retaining path and remove the reference held by the owner that outlives the node.
- Memory remains high after teardown, but retained objects do not grow. Verify the process and memory domain being monitored, allow the normal settling period, and compare repeated snapshots before concluding that a retention leak remains.
- Snapshot capture crashes or stalls the runner. Snapshotting blocks the event loop and may need about twice the heap’s memory at capture time. Capture under controlled conditions with adequate headroom.
Or skip the browser setup
If your task is to capture website screenshots rather than diagnose your automation runtime, ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers.
Use the documented API parameters and change only the target URL as needed. See the ScreenshotNeo documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up free for 1,000 screenshots a month, with no card required.
Frequently Asked Questions
Can a heap snapshot show memory used by every browser process?
No. A snapshot shows reachable JavaScript objects in the captured heap. Browser subprocess and native memory require separate process-level investigation.
Does a rising RSS number mean a Node.js JavaScript leak?
No. RSS includes memory outside the V8 heap. Compare it with V8 statistics and investigate the process or allocation domain that accounts for the difference.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →




