Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate ReactHost / ReactInstanceManager destroy() call sites to use …
…invalidate() (facebook#45082) Summary: Pull Request resolved: facebook#45082 Changelog: [Android][Breaking] `ReactNativeHost` invalidates the instance manager on `clear()` Changes `ReactNativeHost.clear()` to invalidate the underlying `ReactInstanceManager`, rather than merely destroying the instance. This is technically a **breaking change** because the underlying `ReactInstanceManager` may have escaped (via `ReactNativeHost.getReactInstanceManager()`) before the `clear()` call. In my reading of the API and of usages like [this one in Expo](https://github.com/expo/expo/blob/23a905b17065703882ebeda1fc9f65a05cc69fa7/packages/expo-dev-menu-interface/android/src/main/java/expo/interfaces/devmenu/ReactHostWrapper.kt#L117), this should rarely occur in practice. The plan: 1. D58811090: Add the basic `invalidate()` functionality. 2. **[This diff]**: Add `invalidate()` call sites where it makes sense in core. 3. [Upcoming diff]: Keep the Fusebox debugging target registered until the Host is explicitly invalidated. Reviewed By: javache Differential Revision: D58811091
- Loading branch information