Version
latest of 18, 20, 21
Platform
GitHub Actions on ubuntu-latest (and any other platform)
Subsystem
No response
What steps will reproduce the bug?
See https://github.com/enisdenjo/node-leak for repro. Also its failing CI for running repro.
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
VM's context gets garbage-collected when evaluating both CJS and ESM scripts.
What do you see instead?
VM's context doesn't get garbage-collected when evaluating ESM script. While with CJS it does.
Additional information
No response