Skip to content

Conversation

@ksokolovskyi
Copy link
Contributor

@ksokolovskyi ksokolovskyi commented Oct 5, 2023

This PR mainly fixes several memory leaks in the DateRangePickerDialog.

Description

Tests

  • Updates test/material/date_picker_theme_test.dart to use testWidgetsWithLeakTracking;
  • Updates test/material/date_range_picker_test.dart to use testWidgetsWithLeakTracking.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Oct 5, 2023
@TahaTesser TahaTesser self-requested a review October 5, 2023 14:16
@TahaTesser
Copy link
Member

@ksokolovskyi
Thanks for the PR!

@ksokolovskyi
Copy link
Contributor Author

cc @polina-c

@polina-c polina-c added the a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker label Oct 5, 2023
@polina-c
Copy link
Contributor

polina-c commented Oct 5, 2023

LGTM. I would like @TahaTesser 's lgtm before merging this.

Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 6, 2023
@auto-submit auto-submit bot merged commit d76e3ab into flutter:master Oct 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 6, 2023
flutter/flutter@fe0275f...ad20089

2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from cc9bc9e2c0d3 to 59b6b94e1a51 (1 revision) (flutter/flutter#136066)
2023-10-06 sokolovskyi.konstantin@gmail.com Fix memory leaks in DateRangePickerDialog. (flutter/flutter#136034)
2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6492e1f8c315 to cc9bc9e2c0d3 (1 revision) (flutter/flutter#136062)
2023-10-06 5236035+fzyzcjy@users.noreply.github.com Tiny improve code style by using records instead of lists (flutter/flutter#135886)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 27a674466094 to 6492e1f8c315 (1 revision) (flutter/flutter#136052)
2023-10-05 smartercallum@gmail.com Upload frame_request_pending_latency [attempt #2] (flutter/flutter#135890)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0ff05464f42f to 27a674466094 (1 revision) (flutter/flutter#136050)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from ad83202a59a6 to 0ff05464f42f (1 revision) (flutter/flutter#136047)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f8d53c5fe9f2 to ad83202a59a6 (2 revisions) (flutter/flutter#136040)
2023-10-05 engine-flutter-autoroll@skia.org Roll Packages from d654f75 to 6714d50 (3 revisions) (flutter/flutter#136039)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,ychris@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
This PR mainly fixes several memory leaks in the `DateRangePickerDialog`.

### Description
- Fixes flutter#136033 by:
    1) adding a disposal of several `RestorableValue`;
    2) creating a separate `_DayItem` stateful widget that creates/updates/disposes internal `MaterialStatesController`.
- Marks flutter#136036.

### Tests
- Updates `test/material/date_picker_theme_test.dart` to use `testWidgetsWithLeakTracking`;
- Updates `test/material/date_range_picker_test.dart` to use `testWidgetsWithLeakTracking`.
@polina-c polina-c changed the title Fix memory leaks in DateRangePickerDialog. Fix memory leaks in DateRangePickerDialog. [prod-leak-fix] Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory Leak: DateRangePickerDialog has several memory leaks.

3 participants