Skip to content
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

Fixes memory-leaks #103

Merged
merged 4 commits into from
Aug 25, 2022
Merged

Conversation

gurupras
Copy link
Contributor

Should fix #102

index.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Thanks for working on this. Can you add some tests?

@gurupras
Copy link
Contributor Author

gurupras commented Aug 13, 2022

That would require some design decisions that I'm not sure I'm well-equipped to make, given that I only started poking at the codebase < 12 hours ago.

For example, currently, the maps (eventsMap, producersMap) are private and would require some refactoring to get to them from tests.

This cleanup is expected to occur when all event listeners
for a specific event are removed
@gurupras
Copy link
Contributor Author

I added a test for off(). I don't really understand what the producersMap is for or how to go about testing that map, sorry.

@sindresorhus sindresorhus merged commit 3641e7a into sindresorhus:main Aug 25, 2022
@gurupras gurupras deleted the memory-leak-fixes branch August 25, 2022 04:41
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.

Possible memory-leak in bindMethods
2 participants