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

ComponentConnectionContext does not do clean up all listeners if closed through the registration #44

Closed
Legioth opened this issue Jun 7, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Legioth
Copy link
Member

Legioth commented Jun 7, 2021

If running remove() on the Registration returned by ComponentConnectionContext::setActivationHandler while there is some attached component, then all detach handlers will be removed but we won't be running deactivateConnection() which takes care of removing references to the ComponentConnectionContext instance from the global handler lists in BeaconHandler and ServiceDestroyDelegate. Unless I've read the code wrong, this means that we would end up leaking some memory.

@Legioth Legioth added the bug Something isn't working label Jun 7, 2021
@heruan
Copy link
Member

heruan commented Jul 6, 2021

Add a test to verify that not all the listeners are removed when deactivating the context; then, fix the bug.

@heruan heruan closed this as completed Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants