Fixes #11: Memory management enhancements #12

Merged
Pakobbix merged 1 commits from issue-11-memory-management into main 2026-07-12 12:44:07 +00:00
Collaborator

Memory management optimizations:

  • clearDomCache(): Invalidates jQuery object cache on panel rebuild
  • Event tracking: All on()/once() handlers now tracked for cleanup by unregisterAllEvents()
  • clearDebugLogs(): Called on CHAT_CHANGED to prevent memory accumulation
  • jQuery cleanup infrastructure: trackJQueryHandler()/cleanupJQueryEvents() for future use
  • 14 new tests, all passing

Closes #11

Memory management optimizations: - clearDomCache(): Invalidates jQuery object cache on panel rebuild - Event tracking: All on()/once() handlers now tracked for cleanup by unregisterAllEvents() - clearDebugLogs(): Called on CHAT_CHANGED to prevent memory accumulation - jQuery cleanup infrastructure: trackJQueryHandler()/cleanupJQueryEvents() for future use - 14 new tests, all passing Closes #11
ARIA added 1 commit 2026-07-12 12:33:52 +00:00
- Add clearDomCache() for jQuery object cache invalidation on panel rebuild
- Track all event handlers in on()/once() for complete cleanup by unregisterAllEvents()
- Migrate direct eventSource.on() calls to tracked onEvent() in index.js, injector.js, sillyTavernExpressions.js
- Add clearDebugLogs() called on CHAT_CHANGED to prevent memory accumulation
- Add trackJQueryHandler()/cleanupJQueryEvents() infrastructure for jQuery event cleanup
- Add comprehensive memory management tests (14 new tests, all passing)
Collaborator

No issues found — changes look consistent with the stated intent. Ready to be merged.

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
Pakobbix merged commit 29f7865927 into main 2026-07-12 12:44:07 +00:00
Pakobbix deleted branch issue-11-memory-management 2026-07-12 12:44:07 +00:00
Sign in to join this conversation.