Skip to content

Memory Leak via Module.children #2

@Flarna

Description

@Flarna

I think there is a potential memory leak if stealthy-require is used.

If a non internal module is required Module._load() creates a new Module instance.
The constructor of Module appends this new instance to the parent Module which is the Module where the stealthy require is done and therefore not effected by the post load require cache clean.

Therefore even the stealthy required module instance is removed from require cache there are leftovers in the parent Module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions