From 08afd899090d662024c8893919b868cb7b8dc8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 28 May 2021 13:56:32 +0200 Subject: [PATCH] Fix raised hand handler not detached when peer is destroyed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a memory leak, as the reference to the Peer object was retained forever by the webrtc object. Signed-off-by: Daniel Calviño Sánchez --- src/utils/webrtc/models/CallParticipantModel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/webrtc/models/CallParticipantModel.js b/src/utils/webrtc/models/CallParticipantModel.js index dc4028b96..748ae31f2 100644 --- a/src/utils/webrtc/models/CallParticipantModel.js +++ b/src/utils/webrtc/models/CallParticipantModel.js @@ -97,6 +97,7 @@ CallParticipantModel.prototype = { this._webRtc.off('mute', this._handleMuteBound) this._webRtc.off('unmute', this._handleUnmuteBound) this._webRtc.off('channelMessage', this._handleChannelMessageBound) + this._webRtc.off('raisedHand', this._handleRaisedHandBound) }, get: function(key) {