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

Specify lifetime of the targets of a IntersectionObserver instance #520

Open
xeaone opened this issue Dec 20, 2023 · 0 comments
Open

Specify lifetime of the targets of a IntersectionObserver instance #520

xeaone opened this issue Dec 20, 2023 · 0 comments

Comments

@xeaone
Copy link

xeaone commented Dec 20, 2023

I have a question about the lifetime of the observed targets of an IntersectionObserver instance. If an instance of a IntersectionObserver exists and it observers multiple targets what happens to the targets removed from the DOM and do not have a reference. Will they get garbage collected and will any internal event listeners or references to the removed target be cleaned up or garbage collected?

These issues are similar but what's unclear to me is the observed targets and any internal impact by not explicitly calling unobserve on observed targets.

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

1 participant