Fix memory leaks

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-01-05 17:48:37 +05:30
parent c304670f47
commit 53f3ccc888

View file

@ -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]);