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

removeAllListeners or removeEventListener doesn't change the count #14

Open
mjhassan opened this issue May 31, 2020 · 2 comments
Open

Comments

@mjhassan
Copy link

Thank you for this awesome module.

Whenever I perform removeEventListener or removeAllListeners after registering a listener it does remove from ref array but count property remains unchanged. Why is that?

In addition to that, if I emit an event after removing the listener it still invokes the handler. Anything I'm missing here?

@mjhassan mjhassan changed the title removeAllListeners or removeEventListener doesn't change the count *removeAllListeners* or *removeEventListener* doesn't change the **count** May 31, 2020
@mjhassan mjhassan changed the title *removeAllListeners* or *removeEventListener* doesn't change the **count** removeAllListeners or removeEventListener doesn't change the count May 31, 2020
@JunWangMaster
Copy link

JunWangMaster commented Aug 26, 2020

count should not be removed, it should always increase, it is the handle returned to caller, if it's changed, event1 register can unregister event2.

@tegozen
Copy link

tegozen commented Jul 14, 2022

is it joke?)) how we can remove handler?

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

3 participants