Skip to content

Commit 9dd3e1e

Browse files
authored
Fix memory leak in _DarwinViewState. (flutter#134938)
1 parent bac5e5d commit 9dd3e1e

File tree

2 files changed

+108
-104
lines changed

2 files changed

+108
-104
lines changed

packages/flutter/lib/src/widgets/platform_view.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,9 @@ abstract class _DarwinViewState<PlatformViewT extends _DarwinView, ControllerT e
665665

666666
if (widget.viewType != oldWidget.viewType) {
667667
_controller?.dispose();
668+
_controller = null;
669+
focusNode?.dispose();
670+
focusNode = null;
668671
_createNewUiKitView();
669672
return;
670673
}

0 commit comments

Comments
 (0)