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
Use WeakSet to replace fitties arrray #101
Comments
Thanks for the suggestion, that indeed sounds like a nice improvement. Note that there are probably lots of improvements possible, but at this point if it works I'm mostly okay with not changing it. |
Lemon2311
added a commit
to Lemon2311/fitty
that referenced
this issue
Dec 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now in the code, we are using a plain array to store HTMLElement.
This can cause run-time unable to gabage collector those HTMLElement after the HTMLElement already remove in DOM.
Right now we need to call the
unsubscribe
on on the fitty instance to instead. But using Weakset, we can let the run-time GC those element for us.The text was updated successfully, but these errors were encountered: