Closed dfabreguette closed 3 years ago
А ведь утечка-то есть... Антон, хотя б последний файл-то замердж (c beforeDestroy()
). В SPA раз 5 релоадишь компонент и начинает тупить с каждым разом всё больше... (
@dfabreguette-ap , I saw your PR . As @antonreshetov didn't merged it ( he probably not gonna continue working on vue-glide ) , is it safe too use your repository for glide ? or can i simply use
beforeDestroy() {
if (this.glide) this.glide.destroy()
}
in my component were vue-glide is imported??
There is no memory leakage. When a component is created, a new Glide.js instance is created and assigned to a local variable. When the component is destroyed, all local variables will also be destroyed, so there is no need to call Glide.js destroy method.
Alright, thx !
Hi guys, according to this blog post https://vuejs.org/v2/cookbook/avoiding-memory-leaks.html, it looks like "glide" instance is not properly destroyed on component destroy. I guess the simple solution is to add this :
Do you want a PR for that ?