woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.28k stars 53 forks source link

Fix client side flash when navigating #134

Closed louis-smit closed 6 months ago

louis-smit commented 6 months ago

Fix for issue #125 while still preventing memory leak.

woutdp commented 6 months ago

Does it prevent the memory leak (seems it's still there)? Just wondering as I've looked at this fix myself last week (saw how it was done in LiveVue) but couldn't reproduce the memory leak locally. There's also an indication that the memory leak is caused by the Elixir node library so I'm fine with merging this.

louis-smit commented 6 months ago

I made sure the components get destroyed properly and monitored the memory tab for a couple hours and could not replicate the slight spike in memory that I previously could. So I (perhaps incorrectly) assumed that the memory leak is still fixed. Happy to be wrong though!