Skip to content

Commit

Permalink
Fix memory leak issue with devtools (#1335)
Browse files Browse the repository at this point in the history
  • Loading branch information
hehaijin committed Apr 25, 2024
1 parent 10e61ed commit 62e8bd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-balloons-prove.md
@@ -0,0 +1,5 @@
---
"apollo-client-devtools": patch
---

Fixed a memory leak issue with devtools
3 changes: 0 additions & 3 deletions src/extension/messageAdapters.ts
Expand Up @@ -18,9 +18,6 @@ export function createPortMessageAdapter<
return {
addListener(listener) {
port.onMessage.addListener(listener);
port.onDisconnect.addListener(() => {
port.onMessage.removeListener(listener);
});

return () => {
port.onMessage.removeListener(listener);
Expand Down

0 comments on commit 62e8bd6

Please sign in to comment.