Skip to content

Commit

Permalink
fix: free memory from internal cache when disconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jul 30, 2024
1 parent b2e5384 commit 6b46062
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/OnyxUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ function deleteKeyByConnections(connectionID: number) {
const updatedConnectionIDs = onyxKeyToConnectionIDs.get(subscriber.key).filter((id: number) => id !== connectionID);
onyxKeyToConnectionIDs.set(subscriber.key, updatedConnectionIDs);
}

lastConnectionCallbackData.delete(connectionID);
}

/** Returns current key names stored in persisted storage */
Expand Down

0 comments on commit 6b46062

Please sign in to comment.