mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Implement release of FabricUIManager resources
Reviewed By: achen1 Differential Revision: D8232155 fbshipit-source-id: 6683c692a830f5a73aab2c606167e54d668ae5c2
This commit is contained in:
committed by
Facebook Github Bot
parent
6aea98441a
commit
8529b1ee91
@@ -338,10 +338,14 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
@Override
|
||||
public void run() {
|
||||
mNativeModuleRegistry.notifyJSInstanceDestroy();
|
||||
mJSIModuleRegistry.notifyJSInstanceDestroy();
|
||||
boolean wasIdle = (mPendingJSCalls.getAndSet(0) == 0);
|
||||
if (!wasIdle && !mBridgeIdleListeners.isEmpty()) {
|
||||
if (!mBridgeIdleListeners.isEmpty()) {
|
||||
for (NotThreadSafeBridgeIdleDebugListener listener : mBridgeIdleListeners) {
|
||||
listener.onTransitionToBridgeIdle();
|
||||
if (!wasIdle) {
|
||||
listener.onTransitionToBridgeIdle();
|
||||
}
|
||||
listener.onBridgeDestroyed();
|
||||
}
|
||||
}
|
||||
AsyncTask.execute(
|
||||
@@ -351,7 +355,8 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
// Kill non-UI threads from neutral third party
|
||||
// potentially expensive, so don't run on UI thread
|
||||
|
||||
// contextHolder is used as a lock to guard against other users of the JS VM having
|
||||
// contextHolder is used as a lock to guard against other users of the JS VM
|
||||
// having
|
||||
// the VM destroyed underneath them, so notify them before we resetNative
|
||||
mJavaScriptContextHolder.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user