Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Mar 12, 2024
1 parent 1408a3c commit 16e38bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/internal/RtcEngineExInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
override release(sync: boolean = false) {
this._media_engine.release();
this._local_spatial_audio_engine.release();
RtcEngineExInternal._event_handlers.map((it) => {
super.unregisterEventHandler(it);
});
RtcEngineExInternal._event_handlers = [];
RtcEngineExInternal._direct_cdn_streaming_event_handler = [];
RtcEngineExInternal._metadata_observer = [];
Expand All @@ -91,7 +94,6 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {
MediaRecorderInternal._observers.clear();
this._h265_transcoder.release();
this.removeAllListeners();
this.unregisterEventHandler(this as IRtcEngineEventHandler);
super.release(sync);
}

Expand Down

0 comments on commit 16e38bf

Please sign in to comment.