You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because all Parts are added to a global Map, they will persist forever, even if the template instance that contained the part is no longer rendered. Fixing this likely requires the directive disconnect feature (lit/lit#283) requested on lit-html, but I wanted to file an issue here to track it.
The text was updated successfully, but these errors were encountered:
I did implement a cleanup functionality that is run every minute when idle to avoid memory leaks. It can be found in https://github.com/andreasbm/lit-translate/blob/master/src/lib/cleanup.ts. I just added a test case for it in #5. You might be able to tell me if I am missing something here, but from my tests this avoids memory leaks. This was the best solution I was able to come up with and it will be obsolete when it is possible to add cleanup logic in directives.
Because all Parts are added to a global Map, they will persist forever, even if the template instance that contained the part is no longer rendered. Fixing this likely requires the directive disconnect feature (lit/lit#283) requested on lit-html, but I wanted to file an issue here to track it.
The text was updated successfully, but these errors were encountered: