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

Event listeners are not freed #533

Closed
mjeffrie opened this issue Jan 11, 2020 · 0 comments
Closed

Event listeners are not freed #533

mjeffrie opened this issue Jan 11, 2020 · 0 comments

Comments

@mjeffrie
Copy link
Contributor

Event listeners are created and sometimes not removed. This leads to memory leaks.

This happens when isCaptureMode is true, since removeEventListener needs the same useCapture flag as used in addEventListener.

Possible fixes include:

  1. calling removeEventListener twice with true and false for useCapture.
  2. storing the useCapture value used by addEventListener and using it when calling removeEventListener.
  3. providing currentTarget to determine isCaptureMode when calling removeEventListener.
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

No branches or pull requests

2 participants