内存泄漏问题优化

This commit is contained in:
wangcongtao
2021-01-11 11:31:40 +08:00
parent 9273942a42
commit 49ab4e52de
5 changed files with 16 additions and 2 deletions

View File

@@ -78,4 +78,6 @@ public interface IMogoFragmentManager extends IProvider {
void initMessageHistoryContainerId( int layoutId );
int getMessageHistoryContainerId();
void destroy();
}

View File

@@ -48,7 +48,7 @@ public class FragmentStack {
return sInstance;
}
public synchronized void release() {
public static synchronized void release() {
sInstance = null;
}
@@ -199,4 +199,8 @@ public class FragmentStack {
}
invokeCallback();
}
public void destroy(){
mFragmentManager = null;
}
}

View File

@@ -74,6 +74,11 @@ public class MogoFragmentManager implements IMogoFragmentManager {
return FragmentStack.getInstance().getMessageHistoryContainerId();
}
@Override
public void destroy() {
FragmentStack.getInstance().destroy();
}
@Override
public void init( Context context ) {