Skip to content

Commit

Permalink
Remove all event listeners on close to avoid memory leak (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-hexagon authored and SBoudrias committed Jun 20, 2019
1 parent 91a4d59 commit 705e9cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/inquirer/lib/prompts/base.js
Expand Up @@ -78,6 +78,7 @@ class Prompt {
*/
close() {
this.screen.releaseCursor();
this.rl.input.removeAllListeners();
}

/**
Expand Down

0 comments on commit 705e9cc

Please sign in to comment.