fix: Timeout, interval, and subscription leaks in memory management #9426

Closed
opened 2026-02-16 18:12:26 -05:00 by yindo · 2 comments
Owner

Originally created by @sauerdaniel on GitHub (Feb 15, 2026).

Originally assigned to: @rekram1-node on GitHub.

Several memory management code paths create timers (setTimeout/setInterval) and event subscriptions that are never cleaned up on disposal, causing resource leaks.

Expected: All timers and subscriptions are cleared when the owning context is disposed.
Actual: Timers and subscriptions persist after disposal.

Originally created by @sauerdaniel on GitHub (Feb 15, 2026). Originally assigned to: @rekram1-node on GitHub. Several memory management code paths create timers (`setTimeout`/`setInterval`) and event subscriptions that are never cleaned up on disposal, causing resource leaks. **Expected:** All timers and subscriptions are cleared when the owning context is disposed. **Actual:** Timers and subscriptions persist after disposal.
yindo added the perf label 2026-02-16 18:12:26 -05:00
yindo closed this issue 2026-02-16 18:12:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9156: Memory leak: Uncleaned timeouts, intervals, and subscriptions (most closely related - 95%+ overlap)
  • #9154: Memory leak: ACP session event streams never aborted
  • #9155: Memory leak: TUI and Slack bot event listeners not cleaned up
  • #9157: Memory leak: Instance disposal doesn't clean up plugins or cached resources

All of these are related efforts to address resource cleanup on disposal (tracking issue #5363).

@github-actions[bot] commented on GitHub (Feb 15, 2026): This issue might be a duplicate of existing issues. Please check: - #9156: Memory leak: Uncleaned timeouts, intervals, and subscriptions (most closely related - 95%+ overlap) - #9154: Memory leak: ACP session event streams never aborted - #9155: Memory leak: TUI and Slack bot event listeners not cleaned up - #9157: Memory leak: Instance disposal doesn't clean up plugins or cached resources All of these are related efforts to address resource cleanup on disposal (tracking issue #5363).
Author
Owner

@sauerdaniel commented on GitHub (Feb 15, 2026):

Duplicate — closing in favor of the original issue.

@sauerdaniel commented on GitHub (Feb 15, 2026): Duplicate — closing in favor of the original issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9426