Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve Paper leak on Android (facebook#46896)
Summary: On Android Paper UIManager, when calling `ReactRootView.unmountReactApplication`, the ReactRootView tag is unset [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java#L926), before the round trip unmount operation to JS makes it's way back to a `dropView` call on `NativeViewHierarchyManager`. In practice, this means that legacy architecture apps that unmount surfaces via `ReactRootView.unmountReactApplication` leak references to Views, and the "finalization" step (`onDropViewInstance`) is not universally called. This is an attempt to fix the issue by skipping the `clearReactRoot` step on Paper, instead waiting for the round trip `UIManager.removeRootView` call. ## Changelog [Android][Fixed] Fix issue where `onDropViewInstance` cleanup was not being handled after `ReactRootView.unmountReactApplication` Differential Revision: D64054042
- Loading branch information