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 Manager failing to properly remove event listeners from Connection #80

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

david-hodgetts
Copy link
Contributor

I believe there is a memory leak in the handling of event listeners in the Manager class.
The callbacks registered on the Connection object in the addEventListeners method are improperly removed in the removeEventListeners method.
The references to the callbacks are lost because they are modified by a call to the bind method. Each call to bind creates a new reference, see.

@jaakkos
Copy link
Owner

jaakkos commented Jul 28, 2023

Good catch 👍 I didn't remember that while doing the change. I'll just run the extra checks; if they pass, I'll merge them.

@jaakkos jaakkos merged commit 0b602cc into jaakkos:main Jul 28, 2023
8 of 10 checks passed
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.

2 participants