[PR #311] [MERGED] refactor(console): improve log entry handling and add destroy method #1222

Closed
opened 2026-03-14 09:25:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/311
Author: @msmps
Created: 11/12/2025
Status: Merged
Merged: 11/12/2025
Merged by: @kommander

Base: mainHead: fix/console-memory-leak-20251112222551


📝 Commits (1)

  • 8f57cbc refactor(console): improve log entry handling and add destroy method

📊 Changes

2 files changed (+11 additions, -3 deletions)

View changed files

📝 packages/core/src/console.ts (+10 -2)
📝 packages/core/src/renderer.ts (+1 -1)

📄 Description

  • Introduced a private listener for log entries.
  • Updated the destroy method to properly clean up the entry listener from the terminal console cache.

Fixes:

"Possible EventTarget memory leak detected. 11 entry listeners added to [TerminalConsoleCache]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit"


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/311 **Author:** [@msmps](https://github.com/msmps) **Created:** 11/12/2025 **Status:** ✅ Merged **Merged:** 11/12/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix/console-memory-leak-20251112222551` --- ### 📝 Commits (1) - [`8f57cbc`](https://github.com/anomalyco/opentui/commit/8f57cbc31f3d5b0289cd45ec42419919e271a4ab) refactor(console): improve log entry handling and add destroy method ### 📊 Changes **2 files changed** (+11 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/console.ts` (+10 -2) 📝 `packages/core/src/renderer.ts` (+1 -1) </details> ### 📄 Description - Introduced a private listener for log entries. - Updated the destroy method to properly clean up the entry listener from the terminal console cache. Fixes: > "Possible EventTarget memory leak detected. 11 entry listeners added to [TerminalConsoleCache]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit" --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:25:06 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1222
No description provided.