-
Notifications
You must be signed in to change notification settings - Fork 2
End handlers not being removed after next resolve #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Merged
basicdays
added a commit
that referenced
this issue
May 30, 2018
Switching to using babel transform runtime solves issue #5.
I haven't released this fully yet, but I did publish a beta version of this that also fixes a couple other issues. If you would like to test it out, it's available under |
basicdays
added a commit
that referenced
this issue
Mar 16, 2022
- Breaking Change: Dropping support for Node 11 and below. - Breaking Change: Dropping support for Flow. - Bug Fix: Resolves #5. Event handlers are cleaned up after each iteration, fixing some memory leak issues. - Bug Fix: Resolves #7. Code no longer depends on babel runtimes or regenerator. - Bug Fix: Handles stream not buffering due to starving the event loop. - Feature: Resolves #1. Now handles `.throw` and `.return` hooks on the async iterator. - Feature: Properly closes stream when finished. - Feature: Added support for TypeScript. - Feature: Support for Node.js versions 12, 14, and 16. - Chore: General overhaul of project setup (should not impact what is published).
Released in v1.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the notReadable state it's listening for either the end or read callback to finish, unfortunately if the read callback fires it doesn't clean up the end callback. And after 11 calls to next there are 10 event listeners for the end callback.
I know in my node version I get warned about possible memory leaks.
Suggestion
The existing logic here
Could possibly changed to this
The cleanUp callbacks will unhook any dangling event listeners
The text was updated successfully, but these errors were encountered: