Akryum / floating-vue

💬 Easy tooltips, popovers, dropdown, menus... for Vue
https://floating-vue.starpad.dev/
MIT License
3.28k stars 335 forks source link

fix: Avoid SSR memory leak #948

Open rdsfj opened 1 year ago

rdsfj commented 1 year ago

hello 🙋‍♀️

using the package v-tooltip@2, I encountered some problems with memory leaks in a server side rendering setup. I tracked down the problems to usage of v-tooltip and its object of default options. I couldn't quite figure out the reason, but I suspect that vue instances are not garbage collected because they are somehow connected to this object.

Anyway, moving the default options to a factory resolves the problem. The default object is not exposed outside the package, so as far as I can tell this shouldn't change any functionalit.

It would be great to see a new version of v-tooltip released even though floating-vue is the successor. Let me know what you think and if I can help! Simon