Skip to content

Commit

Permalink
Stop ReactSurface in ReactDelegate::onHostDestroy (bridgeless) (#44873)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44873

Changelog:
[Android][Fixed] - Unmount React root when activity is destroyed on bridgless

Reviewed By: javache

Differential Revision: D58411605

fbshipit-source-id: ff9940efd4cf5da5887d79d99bcf3721e16d6725
  • Loading branch information
fabriziocucci authored and facebook-github-bot committed Jun 12, 2024
1 parent b8f1b92 commit 33aa83a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ public void onHostPause() {

public void onHostDestroy() {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
if (mReactSurface != null) {
mReactSurface.stop();
mReactSurface = null;
}
mReactHost.onHostDestroy(mActivity);
} else {
if (mReactRootView != null) {
Expand Down

0 comments on commit 33aa83a

Please sign in to comment.