fix multiwindow due to mounts not dropping in virtualdom (#4351)
* fix handlers not dropping thanks to mounts * use `desktop` * Add tasks and effects * only destroy on virtualdom destroy * fix clippy
This commit is contained in:
1 parent
ff762cec84
commit
1db4b2a13d
3 files changed
+16
-7
No files matched your search
@@ -773,6 +773,11 @@ impl Drop for VirtualDom {
|
||||
for scope in scopes.into_iter().rev() {
|
||||
drop(scope);
|
||||
}
|
||||
|
||||
// Drop the mounts, tasks, and effects, releasing any `Rc<Runtime>` references
|
||||
self.runtime.pending_effects.borrow_mut().clear();
|
||||
self.runtime.tasks.borrow_mut().clear();
|
||||
self.runtime.mounts.borrow_mut().clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user