在Presenter层定义
private Reference<T>tReference;
public void detchView(){
if (tReference!=null){
tReference.clear();
tReference=null;
}
}
在Mainactivity调用
protected void onDestroy() {
super.onDestroy();
presenter.detchView();
}