Skip to content

Commit

Permalink
解决声网sdk官方的内存泄漏bug
Browse files Browse the repository at this point in the history
  • Loading branch information
QDong415 committed Apr 8, 2021
1 parent e4e383a commit 4184e52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- ✅ 界面精致美观(仿微信)、流畅无卡顿
- ✅ 语音条 + 微信表情 + 图片 + 视频通话 + 语音通话
- ✅ 消息静音设置,黑名单设置
- ✅ 无任何内存泄漏
- ✅ 黑夜模式
- ✅ java+mvc+okhttp+glide,封装都较简易,各模块都可方便替换成你自己的项目
- ✅ 为方便测试,我额外集成了友盟的手机号一键登录,若无此需求,可删除
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,11 @@ private void endCall() {
mLocalVideo = null;
removeFromParent(mRemoteVideo);
mRemoteVideo = null;
}

//官方demo里没有这两句,但是我发现不加第一句会内存泄漏,然后我同理推出了第2句
callManager.mRtcEngine.setupLocalVideo(null);
callManager.mRtcEngine.setupRemoteVideo(null);
}

public void onMinimizeClick(View view) {
super.onMinimizeClick(view);
Expand Down

0 comments on commit 4184e52

Please sign in to comment.