fix(watch): close MultiBackend's sync and sources#1399
Conversation
MultiBackend.close() only closed its own #runElement signal, leaving the Sync and the two Source instances (constructed as fields, not inside an Effect) alive. Each owns its own Effect with several .run() handlers that never get cleaned up, surfacing as "Signals was garbage collected without being closed" warnings whenever a watch component unmounts. Close them explicitly, ordered so inner Decoder/Renderer/Emitter (spawned via the #runElement effect) finish before the sources/sync they reference are torn down.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR expands the 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
MultiBackend.close() only closed its own #runElement signal, leaving the Sync and the two Source instances (constructed as fields, not inside an Effect) alive. Each owns its own Effect with several .run() handlers that never get cleaned up, surfacing as "Signals was garbage collected without being closed" warnings whenever a watch component unmounts.
Close them explicitly, ordered so inner Decoder/Renderer/Emitter (spawned via the #runElement effect) finish before the sources/sync they reference are torn down.