Skip to content

Commit

Permalink
fix: fix possible EventEmitter memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Apr 23, 2024
1 parent 1d5af9b commit aab20fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-bananas-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rnm/tscx": patch
---

fix: fix possible EventEmitter memory leak
1 change: 1 addition & 0 deletions packages/tscx/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class Compiler {
if (!this.currentSubprocess.killed) {
this.currentSubprocess.kill();
}
this.currentSubprocess.removeAllListeners("close");
this.currentSubprocess.on("close", () => {
this.execTasks(id);
});
Expand Down

0 comments on commit aab20fb

Please sign in to comment.