Skip to content

Event listeners are not freed #533

@mjeffrie

Description

@mjeffrie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions