[Bug]: Memory leak in Firefox
Describe the bug
The previous issue #40615 was partially fixed: memory no longer grows while MetaMask stays idle.
However, the leak is still reproducible after user interactions.
After performing multiple swaps, memory usage starts increasing continuously and does not return to baseline.
This appears to be related to transaction/signing/activity lifecycle rather than passive extension background execution.
Expected behavior
No response
Screenshots/Recordings
Collected from about:memory.
At the time of capture:
- ~2.36 GB retained under
window-objects → detached - ~2.18 GB retained under detached
notification.html - ~1.79 GB retained in JS object graph
Steps to reproduce
- Launch browser with clean session.
- Open any swap-enabled website (reproduced on multiple sites, not site-specific).
- Connect MetaMask.
- Perform ~5–10 swaps.
- Confirm transactions through MetaMask popup.
- Continue normal interaction (open activity, confirmations, network updates).
- Observe memory growth in browser / about:memory.
Error messages or log output
Where was this bug found?
Live version (from official store)
Version
13.30.0
Build type
None
Browser
Firefox
Operating system
Linux
Hardware wallet
No response
Additional context
No response
Severity
No response
Hi @FrederikBolding
Memory continues to leak. But now in a different place
Oh no wonder my browser suddenly feels very slow over the past few days, hopefully they can fix this soon
v13.34.1.0 - the same
Missing release label release-13.40.0 on issue. Adding release label release-13.40.0 on issue, as issue is linked to PR #44352 which has this release label.