Skip to content

Commit

Permalink
Fix memory leak in _DarwinViewState. (#134938)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksokolovskyi authored Sep 18, 2023
1 parent bac5e5d commit 9dd3e1e
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 104 deletions.
3 changes: 3 additions & 0 deletions packages/flutter/lib/src/widgets/platform_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,9 @@ abstract class _DarwinViewState<PlatformViewT extends _DarwinView, ControllerT e

if (widget.viewType != oldWidget.viewType) {
_controller?.dispose();
_controller = null;
focusNode?.dispose();
focusNode = null;
_createNewUiKitView();
return;
}
Expand Down
Loading

0 comments on commit 9dd3e1e

Please sign in to comment.