Skip to content

Commit

Permalink
Fix memory leak in promise_manager (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
andogq authored Aug 28, 2024
2 parents 4ff5b54 + b329d2e commit b0bea9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-memory-leak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@qubit-rs/client": patch:bug
---

Fix memory leak in promise manager due to holding references to resolved promises.
1 change: 1 addition & 0 deletions packages/client/src/util/promise_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function create_promise_manager() {
resolve: (response: RpcResponse<unknown>) => {
const handler = promises[response.id];
if (handler) {
delete promises[response.id];
handler(response);
}
},
Expand Down

0 comments on commit b0bea9c

Please sign in to comment.