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

fix leak by releasing ref to observed element #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SergeAstapov
Copy link

We add an observed element to elements array every time we call .observe() however we don't remove the observed element from elements array when we call .unobserve().

this leads to memory leaks in cases e.g. when we render component and use {{in-viewport}} modifier and then destroy component - reference to the observed element would be held up

@SergeAstapov
Copy link
Author

Hi @snewcomer! Would you be able to take a look into changes proposed here?

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.

None yet

1 participant