Unverified Commit 0278671b authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Fix memory leak in Form (#132987)

Diposes some restorable variables that weren't disposed before.
parent b3005a31
......@@ -573,6 +573,13 @@ class FormFieldState<T> extends State<FormField<T>> with RestorationMixin {
super.deactivate();
}
@override
void dispose() {
_errorText.dispose();
_hasInteractedByUser.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (widget.enabled) {
......
......@@ -247,9 +247,6 @@ void main() {
},
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.linux, TargetPlatform.windows }),
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
// TODO(polina-c): remove after fixing
// https://github.com/flutter/flutter/issues/130467
leakTrackingTestConfig: const LeakTrackingTestConfig(allowAllNotDisposed: true, allowAllNotGCed: true),
);
testWidgetsWithLeakTracking(
......
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