Skip to content

Commit e05ae3c

Browse files
authored
Dispose widgets to stop leaks. (#108193)
1 parent dc13fd5 commit e05ae3c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/flutter/lib/src/material/ink_well.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
847847
void dispose() {
848848
FocusManager.instance.removeHighlightModeListener(handleFocusHighlightModeChange);
849849
statesController.removeListener(handleStatesControllerChange);
850+
internalStatesController?.dispose();
850851
super.dispose();
851852
}
852853

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
976976
void dispose() {
977977
activity?.dispose(); // it will be null if it got absorbed by another ScrollPosition
978978
_activity = null;
979+
isScrollingNotifier.dispose();
979980
super.dispose();
980981
}
981982

0 commit comments

Comments
 (0)