Skip to content

Commit

Permalink
Fix memory leak in the memory store
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Feb 16, 2022
1 parent 5021cf0 commit 740a682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class MemoryStore implements IStore {
*/
public removeRoom(roomId: string): void {
if (this.rooms[roomId]) {
this.rooms[roomId].removeListener("RoomState.members", this.onRoomMember);
this.rooms[roomId].currentState.removeListener("RoomState.members", this.onRoomMember);
}
delete this.rooms[roomId];
}
Expand Down

0 comments on commit 740a682

Please sign in to comment.