优化观众LiveRoomViewHolder强引用Context导致的内存泄漏

This commit is contained in:
zlzw 2022-12-05 17:29:21 +08:00
parent 4268816539
commit 84c89d7530
2 changed files with 2 additions and 2 deletions

View File

@ -2156,7 +2156,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
/**
* 接口整合守护展示,用户端使用
*
*/
public void setGuardIcon(GuardUserModel model) {
if (model != null && !TextUtils.isEmpty(model.getGuardUserAvatar())) {
@ -3073,6 +3072,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
mRefreshUserListCallback = null;
mTimeChargeCallback = null;
Contexts = null;
}
public void clearData() {

View File

@ -731,12 +731,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mContext.finish();
}
isQuitF = false;
mContext = null;//上下文置空防止内存泄漏
}
@Override
public void onDestroy() {
MicStatusManager.getInstance().removeOnMicListener(micStatusListener);
mContext = null;//上下文置空防止内存泄漏
}
@Override