This issue is about two related bugs:
observe remains active on views where it shouldn't run (example)
- components Svelte remain in memory and still listening to events like URL changes
Svelte component issue
When I mount() components the first time and then they're removed by GitHub, they're still in memory but dormant, potentially garbage collected if we're lucky.
However with self-updating components, they continue to self-update even when not attached to the document.
Repro
- Open https://github.com/refined-github/refined-github/blob/main/source/features/action-pr-link.tsx
- Click on the "Features" folder
- Click on another feature in the sidebar
the previous component is still updated in memory even if rendered nowhere. This specifically happens because GitHub is removing the first one, so observe will mount a new one.
rgh-feature-descriptions- Update on React navigation #9860 (comment)This issue is about two related bugs:
observeremains active on views where it shouldn't run (example)Svelte component issue
When I
mount()components the first time and then they're removed by GitHub, they're still in memory but dormant, potentially garbage collected if we're lucky.However with self-updating components, they continue to self-update even when not attached to the document.
Repro
the previous component is still updated in memory even if rendered nowhere. This specifically happens because GitHub is removing the first one, so
observewillmounta new one.