The leaveChannel method allows a user to leave a channel and releases all resources related to the call or live broadcast. When the user leaves the channel, the SDK triggers the onLeaveChannel callback.

 private void leaveChannel() {

If the destroy method is called immediately after the leaveChannel method, the leaveChannel process will be interrupted, and the SDK will not trigger the onLeaveChannel callback.