Skip to content

Conversation

@polina-c
Copy link
Contributor

@polina-c polina-c commented Oct 26, 2023

Bigger issue: #137311

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Oct 26, 2023
@polina-c polina-c added the a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker label Oct 26, 2023
@github-actions github-actions bot added the a: animation Animation APIs label Oct 26, 2023
@polina-c polina-c changed the title Prepare Flutter for cleanup for all disposables. Instrument more disposables. Oct 26, 2023
@polina-c polina-c marked this pull request as ready for review October 26, 2023 15:42
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@polina-c
Copy link
Contributor Author

Closing as duplicate: #134839

@polina-c polina-c closed this Oct 26, 2023
@polina-c polina-c reopened this Oct 26, 2023
@polina-c polina-c marked this pull request as ready for review October 26, 2023 23:37
@polina-c polina-c requested a review from chunhtai October 27, 2023 16:20
ValueNotifier<_OverlayEntryWidgetState?>? _overlayEntryStateNotifier = ValueNotifier<_OverlayEntryWidgetState?>(null);

/// Dispatches event of object creation to [MemoryAllocations.instance].
void _maybeDispatchObjectCreation() {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably think about how not to duplicate this method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there are plans and discussions around this: http://flutter.dev/go/introduce-disposable

While we do not have agreement, we are duplicating code. It will be cleaned up. My task is to research different options.
For now I do not want to block leak cleanup, that is done by external developers, in Flutter Framework.

Copy link
Contributor

Choose a reason for hiding this comment

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

should we add a todo then?

@polina-c polina-c requested a review from chunhtai October 27, 2023 17:39
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

ValueNotifier<_OverlayEntryWidgetState?>? _overlayEntryStateNotifier = ValueNotifier<_OverlayEntryWidgetState?>(null);

/// Dispatches event of object creation to [MemoryAllocations.instance].
void _maybeDispatchObjectCreation() {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add a todo then?

@polina-c polina-c added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 27, 2023
@polina-c polina-c merged commit 65c71d4 into flutter:master Oct 28, 2023
@polina-c polina-c deleted the disposables branch October 28, 2023 04:30
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 28, 2023
_maintainState = maintainState;
_maintainState = maintainState {
if (kFlutterMemoryAllocationsEnabled) {
_maybeDispatchObjectCreation();
Copy link
Contributor

Choose a reason for hiding this comment

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

@polina-c Why is if(kFlutterMemoryAllocationsEnabled) being checked twice, once before invoking the _maybeDispatchObjectCreation function and one time within it? Is there a specific reason for this double-check, or am I missing something in this context?

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 28, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 28, 2023
flutter/flutter@5907c97...a4ec627

2023-10-28 [email protected] Roll Flutter Engine from f5fbd9cd60c6 to 84dcb4fb9301 (1 revision) (flutter/flutter#137468)
2023-10-28 [email protected] Roll Flutter Engine from 03de8a41995b to f5fbd9cd60c6 (2 revisions) (flutter/flutter#137467)
2023-10-28 [email protected] Instrument more disposables. (flutter/flutter#137309)
2023-10-28 [email protected] TextPainter should dispatch creation and disposal events. (flutter/flutter#137416)
2023-10-28 [email protected] Roll Flutter Engine from a76821199d9d to 03de8a41995b (2 revisions) (flutter/flutter#137464)
2023-10-28 [email protected] Roll Flutter Engine from f1e30b4b9f27 to a76821199d9d (3 revisions) (flutter/flutter#137462)
2023-10-28 [email protected] Roll Flutter Engine from 7e2aa68b2f27 to f1e30b4b9f27 (2 revisions) (flutter/flutter#137461)
2023-10-27 [email protected] Roll Flutter Engine from 513e007ed682 to 7e2aa68b2f27 (1 revision) (flutter/flutter#137460)
2023-10-27 [email protected] Roll Flutter Engine from 32bb5b057c86 to 513e007ed682 (3 revisions) (flutter/flutter#137457)
2023-10-27 [email protected] Roll Flutter Engine from f2ec263cebf9 to 32bb5b057c86 (1 revision) (flutter/flutter#137452)
2023-10-27 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.4 to 2.22.5 (flutter/flutter#137450)
2023-10-27 [email protected] Roll Flutter Engine from 453a04dbf891 to f2ec263cebf9 (2 revisions) (flutter/flutter#137449)
2023-10-27 [email protected] [web] Add 'nonce' prop to flutter.js loadEntrypoint (flutter/flutter#137204)
2023-10-27 [email protected] Roll Flutter Engine from 1e66c0ae7bda to 453a04dbf891 (1 revision) (flutter/flutter#137446)
2023-10-27 [email protected] Provide exception for listing an issue. (flutter/flutter#137092)
2023-10-27 [email protected] Roll Flutter Engine from 0bba9eeb8f5d to 1e66c0ae7bda (1 revision) (flutter/flutter#137442)
2023-10-27 [email protected] Roll Flutter Engine from a198ad4e740d to 0bba9eeb8f5d (1 revision) (flutter/flutter#137437)
2023-10-27 [email protected] Bump goldctl in .ci.yaml (flutter/flutter#137441)

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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: animation Animation APIs 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 framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants