mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Clear internal maps of NativeModuleRegistry during turn down of the bridge
Summary: This diff clears the internal maps of NativeModuleRegistry during turn down of the bridge. This is necessary for a proper cleanup of these modules. changelog: [internal] internal Reviewed By: ShikaSD Differential Revision: D26239303 fbshipit-source-id: 6e98e5db60a4f54d02e99b03339b03c17ecc183d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1e8c3e4ad8
commit
98165a23f6
@@ -44,5 +44,6 @@ public class JSIModuleRegistry {
|
||||
JSIModuleHolder moduleHolder = entry.getValue();
|
||||
moduleHolder.notifyJSInstanceDestroy();
|
||||
}
|
||||
mModules.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public class NativeModuleRegistry {
|
||||
for (ModuleHolder module : mModules.values()) {
|
||||
module.destroy();
|
||||
}
|
||||
mModules.clear();
|
||||
} finally {
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user