fix: don't have Rc cycles in DioxusElement or Queries (#3618)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-01-21 14:57:31 -08:00
1 parent d42b1d5146
commit d8850c7666
3 files changed
+26 -20

No files matched your search

+1 -2
View File
@@ -88,8 +88,7 @@ pub(crate) struct DesktopEvaluator {
impl DesktopEvaluator {
/// Creates a new evaluator for desktop-based targets.
pub fn create(desktop_ctx: DesktopContext, js: String) -> GenerationalBox<Box<dyn Evaluator>> {
let ctx = desktop_ctx.clone();
let query = desktop_ctx.query.new_query(&js, ctx);
let query = desktop_ctx.query.new_query(&js, desktop_ctx.clone());
// We create a generational box that is owned by the query slot so that when we drop the query slot, the generational box is also dropped.
let owner = UnsyncStorage::owner();