Unverified Commit e05ae3ca authored by Polina Cherkasova's avatar Polina Cherkasova Committed by GitHub

Dispose widgets to stop leaks. (#108193)

parent dc13fd56
......@@ -847,6 +847,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
void dispose() {
FocusManager.instance.removeHighlightModeListener(handleFocusHighlightModeChange);
statesController.removeListener(handleStatesControllerChange);
internalStatesController?.dispose();
super.dispose();
}
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment