Skip to content

nodejs: memory leak in Impit instance constructor #370

@barjin

Description

@barjin

Each Impit instantiation takes up a constant amount of RSS, which is (seemingly) never freed.

import { Impit } from 'impit';

for (let i = 0; i < 30000; i++) {
  const impit = new Impit();

  if (i % 100 === 0) {
    console.log(process.memoryUsage().rss);
  }
}
Image

The expected behaviour should be constant memory usage, as the Impit instances from previous iterations are unreachable and should get GCed.

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions