Skip to content

there may be a memory leak because of timers #2428

@lichliu90

Description

@lichliu90

Please avoid duplicates

Reproducible test case

https://runkit.com/lichliu90/63a1369d53e6bb0008986908

Nock Version

13.2.9

Node Version

v14.17.6

TypeScript Version

No response

What happened?

I use nock in with jest, after I do some test, I found a memory leak. I think may be it because of wrapTimer.
I upload a file in my scene. The file was record in InterceptedRequestRouter's requestBodyBuffers and will not be GC.
image
Here is the heapsnapshot files.
heapsnapshot.zip

Would you be interested in contributing a fix?

  • yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions