Closed stephanoparaskeva closed 2 years ago
Did you find a solution to this? I also want to remove my listeners on unmount.
Just set it to null
ConnectyCube.videochat.onSessionConnectionStateChangedListener = null
Closed due to inactivity. Please create a new issue if needed.
It is quite dangerous having multiple event listeners, is there any way to remove them?
For example here, I'm building a critical function to discover the duration of a call:
Now if there is a remount, this will have 2 listeners and it never removes the listener so the timeline can end up having duplicates at each event looking like this:
6 events rather than 3