From 53f3ccc888daefc07cd5c8418daefe3b258dd09d Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 5 Jan 2022 17:48:37 +0530 Subject: [PATCH] Fix memory leaks Signed-off-by: Ajay Bura --- src/app/organisms/room/RoomViewHeader.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/organisms/room/RoomViewHeader.jsx b/src/app/organisms/room/RoomViewHeader.jsx index 6b8b4c8..847eb6e 100644 --- a/src/app/organisms/room/RoomViewHeader.jsx +++ b/src/app/organisms/room/RoomViewHeader.jsx @@ -56,7 +56,7 @@ function RoomViewHeader({ roomId }) { roomList.on(cons.events.roomList.ROOM_PROFILE_UPDATED, handleProfileUpdate); return () => { - roomList.on(cons.events.roomList.ROOM_PROFILE_UPDATED, handleProfileUpdate); + roomList.removeListener(cons.events.roomList.ROOM_PROFILE_UPDATED, handleProfileUpdate); }; }, [roomId]);