Merge pull request #1364 from Demonthos/fix-core-leak

Fix leak in core because of bump allocated Vec
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2023-08-15 13:54:00 -07:00
commit a2df9c2e89
7 files changed
+29 -16

No files matched your search

+7 -1
View File
@@ -128,7 +128,13 @@ impl<'b> VirtualDom {
});
// Make sure the roots get transferred over while we're here
*right_template.root_ids.borrow_mut() = left_template.root_ids.borrow().clone();
{
let mut right = right_template.root_ids.borrow_mut();
right.clear();
for &element in left_template.root_ids.borrow().iter() {
right.push(element);
}
}
let root_ids = right_template.root_ids.borrow();