mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 17:31:39 +08:00
destroy react instance on background critical memory pressure
Reviewed By: astreet Differential Revision: D2989125 fb-gh-sync-id: 0e441409d6b0ea7d5ff6a037730cc1c36818a2da shipit-source-id: 0e441409d6b0ea7d5ff6a037730cc1c36818a2da
This commit is contained in:
committed by
Facebook Github Bot 6
parent
4b52d185ac
commit
2e4bb5364d
@@ -308,6 +308,11 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
||||
return mDevSupportManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemoryPressureRouter getMemoryPressureRouter() {
|
||||
return mMemoryPressureRouter;
|
||||
}
|
||||
|
||||
private static void initializeSoLoaderIfNecessary(Context applicationContext) {
|
||||
// Call SoLoader.initialize here, this is required for apps that does not use exopackage and
|
||||
// does not use SoLoader for loading other native code except from the one used by React Native
|
||||
@@ -582,6 +587,10 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
||||
mLifecycleState = LifecycleState.BEFORE_CREATE;
|
||||
}
|
||||
|
||||
public LifecycleState getLifecycleState() {
|
||||
return mLifecycleState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (mCurrentReactContext != null) {
|
||||
|
||||
Reference in New Issue
Block a user