Do DOM-events that are not removed in "beforeDestroy" cause a memory leak?

Viewed 156

If you use addEventListener to add events to an element, for example to the root element in the mounted() hook as in

mounted() {
    this.$el.addEventListener("wheel", this.handler);
},

do you have to call removeEventListener in the beforeDestroy() hook to remove it when the component is destroyed and would this cause a memory leak if you don't, or does it not matter?

0 Answers
Related