Clean up in memory_allocations_test.dart. (#125777)

This commit is contained in:
Polina Cherkasova
2023-05-02 09:13:36 -07:00
committed by GitHub
parent 12b3023e98
commit 209865ae19
2 changed files with 4 additions and 12 deletions

View File

@@ -210,12 +210,8 @@ Future<int> _activateFlutterObjectsAndReturnCountOfEvents() async {
changeNotifier.dispose(); count++;
picture.dispose(); count++;
// TODO(polina-c): Remove the condition after
// https://github.com/flutter/flutter/issues/110599 is fixed.
if (!kIsWeb) {
final Image image = await _createImage(); count++; count++; count++;
image.dispose(); count++;
}
final Image image = await _createImage(); count++; count++; count++;
image.dispose(); count++;
return count;
}

View File

@@ -57,12 +57,8 @@ Future<void> _activateFlutterObjects(WidgetTester tester) async {
changeNotifier.dispose();
picture.dispose();
// TODO(polina-c): Remove the condition after
// https://github.com/flutter/flutter/issues/110599 is fixed.
if (!kIsWeb) {
final Image image = await _createImage();
image.dispose();
}
final Image image = await _createImage();
image.dispose();
}
Future<Image> _createImage() async {