Skip to content

VM's context when evaluating ESM script not garbage-collected (works with CJS) #50964

@enisdenjo

Description

@enisdenjo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions