We switched over to Copy types for EventHandlers on elements which is equivalent to calling Signal::new(). This is not necessary for elements, just for child components, and thus caused a memory leak for long-running components.
This PR adds a drop impl to VNode to manually drop listeners when the last VNodeInner is dropped. We can't add the drop impl anywhere else since VNode is the only struct in the chain that can't be destructured, making it semver compatible.
We switched over to Copy types for EventHandlers on elements which is equivalent to calling Signal::new(). This is not necessary for elements, just for child components, and thus caused a memory leak for long-running components.
This PR adds a drop impl to VNode to manually drop listeners when the last VNodeInner is dropped. We can't add the drop impl anywhere else since VNode is the only struct in the chain that can't be destructured, making it semver compatible.
Fix: #2227