Hi all!
TLDR: Chromium based browsers appear to have a memory leak when disposing Verge apps. We are using a non-standard setup: see deployed example app and the code
Our setup consists of a Next.js app that client-side renders the Verge app on a specific route, but also allows for toggling the Verge app on and off within the page as well – i.e. disposing the app, and reinitializing it. What I have found is that, on Chromium based browsers, calling dispose does not free the memory. It works as expected in Safari, and Firefox.
Steps to reproduce:
- Navigate to the deployed example app in a Chromium based browser (Chrome, Chromium, and Brave were the ones I confirmed this behavior in)
- Note your current memory usage
- Click the “Verge Page” link to navigate to the page with the verge app
-
Proceed to repeatedly do either/a combination of after the Verge app finishes loading:
- Click the “Verge Enabled” checkbox to toggle the app off/on
- Click the “Back” link, and then the “Verge Page” link to load the app again
- Check your memory usage again
Of note, is that reloading the site at any point does free the memory.