You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After refactoring my project to replace $dispatch/$broadcast with an empty global Vue instance as a message bus using $on/$emit, I'm finding that if I call vm.$on() from the created() hook of a component, the component's entire state shows up in vm as vm._events.eventName[n].function scope.Closure._this.
Which is all well and good until a component gets destroyed, at which point the events it registered with vm.$on() seem to live forever and keep firing with the complete state it had just before it was destroyed.
Even if I were to add a 'deleted' flag to my components and use it to prevent them from doing anything, they're still setting in memory forever.
Is this a bug, or am I skipping a step somewhere in the component destruction process?