cronvel / terminal-kit

Terminal utilities for node.js
MIT License
3.08k stars 198 forks source link

Possible EventEmitter memory leak #236

Open hemendpatel opened 1 year ago

hemendpatel commented 1 year ago

I'm creating a terminal app and noticed that if we create more than 10 instances of terminal, it is throwing below error. All session are not active at the same time. I have destroyed document and terminal object on close of each session using below code. image

image

Each time when we create a new terminal, we are subscribing to process exit event but can't find an option to unsubscribe or verify before subscribing to same event again and again.

terminal-kit\lib\Terminal.js: image

please guide me if I am missing anything here.

do we have to set MaxListeners to Infinity?