优化观众LiveRoomViewHolder强引用Context导致的内存泄漏
This commit is contained in:
parent
4268816539
commit
84c89d7530
@ -2156,7 +2156,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口整合守护展示,用户端使用
|
* 接口整合守护展示,用户端使用
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public void setGuardIcon(GuardUserModel model) {
|
public void setGuardIcon(GuardUserModel model) {
|
||||||
if (model != null && !TextUtils.isEmpty(model.getGuardUserAvatar())) {
|
if (model != null && !TextUtils.isEmpty(model.getGuardUserAvatar())) {
|
||||||
@ -3073,6 +3072,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
mRefreshUserListCallback = null;
|
mRefreshUserListCallback = null;
|
||||||
mTimeChargeCallback = null;
|
mTimeChargeCallback = null;
|
||||||
|
Contexts = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearData() {
|
public void clearData() {
|
||||||
|
@ -731,12 +731,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
mContext.finish();
|
mContext.finish();
|
||||||
}
|
}
|
||||||
isQuitF = false;
|
isQuitF = false;
|
||||||
mContext = null;//上下文置空防止内存泄漏
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
MicStatusManager.getInstance().removeOnMicListener(micStatusListener);
|
MicStatusManager.getInstance().removeOnMicListener(micStatusListener);
|
||||||
|
mContext = null;//上下文置空防止内存泄漏
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user