Skip to content

Commit

Permalink
Dispose widgets to stop leaks. (#108193)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Jul 26, 2022
1 parent dc13fd5 commit e05ae3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/flutter/lib/src/material/ink_well.dart
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
void dispose() {
FocusManager.instance.removeHighlightModeListener(handleFocusHighlightModeChange);
statesController.removeListener(handleStatesControllerChange);
internalStatesController?.dispose();
super.dispose();
}

Expand Down
1 change: 1 addition & 0 deletions packages/flutter/lib/src/widgets/scroll_position.dart
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
void dispose() {
activity?.dispose(); // it will be null if it got absorbed by another ScrollPosition
_activity = null;
isScrollingNotifier.dispose();
super.dispose();
}

Expand Down

0 comments on commit e05ae3c

Please sign in to comment.