From 6f8e23d49776cf0253b815a064202b6861278da3 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 29 May 2024 13:52:57 +0100 Subject: [PATCH] improve comment --- packages/svelte/src/internal/client/runtime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index ffe321a656..b175d52da1 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -439,9 +439,9 @@ function remove_reaction(signal, dependency) { } } } - debugger; + // If the derived has no reactions, then we can disconnect it from the graph, + // allowing it to either reconnect in the future, or be GC'd by the VM. if (reactions_length === 0 && (dependency.f & DERIVED) !== 0) { - // If the signal is unowned then we need to make sure to change it to maybe dirty. set_signal_status(dependency, MAYBE_DIRTY); remove_reactions(/** @type {import('#client').Derived} **/ (dependency), 0); }