fix(memory): prevent memory leaks in session, server, and frontend

Backend fixes:
- Session: clear _recentTaskDescriptions Map in stop() and clearBuffers()
- Session: null promise callbacks after rejection in runPrompt() catch block
- Server: store subagent/image watcher listener refs and remove on shutdown

Frontend fixes:
- Plan file windows: store drag/resize handlers and clean up on close
- Plan file manager: store drag handler and clean up on close
- cleanupAllFloatingWindows: now cleans up plan file windows

These prevent unbounded memory growth in long-running sessions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-30 13:25:18 +01:00
co-authored by Claude Opus 4.5
parent 2693aea11e
commit e3e0d226ce
3 changed files with 910 additions and 70 deletions
+790 -35
View File
File diff suppressed because it is too large Load Diff