From bb55d65085bed2cb76db44ac93ad284d99adb1af Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 13 Nov 2017 13:16:48 -0800 Subject: [PATCH] Delete the native view when destroying the FlutterView (#4356) Fixes https://github.com/flutter/flutter/issues/12996 --- shell/platform/android/io/flutter/view/FlutterView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/platform/android/io/flutter/view/FlutterView.java b/shell/platform/android/io/flutter/view/FlutterView.java index e5b3ab086..e491c8102 100644 --- a/shell/platform/android/io/flutter/view/FlutterView.java +++ b/shell/platform/android/io/flutter/view/FlutterView.java @@ -319,6 +319,9 @@ public class FlutterView extends SurfaceView } getHolder().removeCallback(mSurfaceCallback); + + mNativeView.destroy(); + mNativeView = null; } @Override -- GitLab