Leaks fix. (#132778)
Fixes https://github.com/flutter/flutter/issues/132769
This commit is contained in:
parent
f0bfd7d641
commit
aa1bacb35a
@ -303,6 +303,7 @@ class _MenuAnchorState extends State<MenuAnchor> {
|
|||||||
_anchorChildren.clear();
|
_anchorChildren.clear();
|
||||||
_menuController._detach(this);
|
_menuController._detach(this);
|
||||||
_internalMenuController = null;
|
_internalMenuController = null;
|
||||||
|
_menuScopeNode.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,6 +552,7 @@ class _MenuAnchorState extends State<MenuAnchor> {
|
|||||||
}
|
}
|
||||||
_closeChildren(inDispose: inDispose);
|
_closeChildren(inDispose: inDispose);
|
||||||
_overlayEntry?.remove();
|
_overlayEntry?.remove();
|
||||||
|
_overlayEntry?.dispose();
|
||||||
_overlayEntry = null;
|
_overlayEntry = null;
|
||||||
if (!inDispose) {
|
if (!inDispose) {
|
||||||
// Notify that _childIsOpen changed state, but only if not
|
// Notify that _childIsOpen changed state, but only if not
|
||||||
|
@ -1480,6 +1480,7 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier {
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_highlightManager.dispose();
|
_highlightManager.dispose();
|
||||||
|
rootScope.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=20230817"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
library;
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
// Fails with "flutter test --test-randomize-ordering-seed=20230817"
|
|
||||||
@Tags(<String>['no-shuffle'])
|
|
||||||
library;
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user