Fix memory leaks
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
c304670f47
commit
53f3ccc888
1 changed files with 1 additions and 1 deletions
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue