Skip to content

Conversation

jkelleyrtp
Copy link
Member

@jkelleyrtp jkelleyrtp commented Jul 2, 2025

From #3588

This is a separate issue entirely - we don't need to change desktop itself, but instead manually change the drop order of the VirtualDom itself.

The virtualdom and the runtime are separate objects, and the data for the onclick handler lives inside the runtime, not the virtualdom. When we call webviews.remove(id), we don't call root.destroy(), and thus the event handlers and their state still persists.


Basically, when a VirtualDom is dropped, we don't unmount any of its handlers from the actual DOM. This leads to a memory leak and then, for desktop, windows not dropping.

The solution is to empty a runtime's state when the virtualdom is dropped.

@jkelleyrtp jkelleyrtp requested a review from a team as a code owner July 2, 2025 03:31
@jkelleyrtp jkelleyrtp merged commit 1db4b2a into main Jul 2, 2025
20 checks passed
@jkelleyrtp jkelleyrtp deleted the jk/multiwindow-fix branch July 2, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant