mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
properly clean up RN
Reviewed By: javache Differential Revision: D5170608 fbshipit-source-id: 065cf4ba4244c26bf5fdf9f5183a6bb1295676ad
This commit is contained in:
committed by
Facebook Github Bot
parent
df1070b750
commit
37536e93b7
@@ -287,6 +287,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
|
||||
// TODO: tell all APIs to shut down
|
||||
mDestroyed = true;
|
||||
|
||||
mNativeModulesQueueThread.runOnQueue(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -297,7 +298,14 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
listener.onTransitionToBridgeIdle();
|
||||
}
|
||||
}
|
||||
mHybridData.resetNative();
|
||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mHybridData.resetNative();
|
||||
// Kill non-UI threads from UI thread.
|
||||
getReactQueueConfiguration().destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user