Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 68ade7f

Browse files
committed
Break the reference cycle between the surface factory and the external view embedder
See flutter/flutter#68315
1 parent ed47fc9 commit 68ade7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shell/platform/android/platform_view_android.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ PlatformViewAndroid::PlatformViewAndroid(
107107
jni_facade_(jni_facade),
108108
platform_view_android_delegate_(jni_facade) {}
109109

110-
PlatformViewAndroid::~PlatformViewAndroid() = default;
110+
PlatformViewAndroid::~PlatformViewAndroid() {
111+
surface_factory_->SetExternalViewEmbedder(nullptr);
112+
}
111113

112114
void PlatformViewAndroid::NotifyCreated(
113115
fml::RefPtr<AndroidNativeWindow> native_window) {

0 commit comments

Comments
 (0)