Skip to content

Conversation

@afharo
Copy link

@afharo afharo commented Feb 28, 2019

When on pretend mode, it is not clearing the setTimeouts. This change will try to avoid creating them if in pretend mode.

When on pretend mode, it is not clearing the setTimeouts. This change will try to avoid creating them if in pretend mode.
@afharo
Copy link
Author

afharo commented Apr 3, 2019

Hello!
Can anyone review this PR? It is causing an important memory leak because it's allocating timeouts and never clearing them when using them in pretend mode.
I use this to help me with the logging of my API requests, but using other libraries to perform the actual request. So the only use I make of this library is pretend only. For every single call, it's allocating a timeout that won't be cleared until it fires off. Also calling the callback twice (once for the successful logging + a second time when the timeout fires off), not allowing the Garbage Collector to clear my callback code either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant