TextPainter should dispatch creation and disposal events.#137416
TextPainter should dispatch creation and disposal events.#137416polina-c merged 2 commits intoflutter:masterfrom
Conversation
|
cc @polina-c |
|
|
||
| @override | ||
| void dispose() { | ||
| _textPainter.dispose(); |
There was a problem hiding this comment.
Now the TODO on line 218 is redundant?
| test('TextPainter dispatches memory events', () async { | ||
| await expectLater( | ||
| await memoryEvents(() => TextPainter().dispose(), TextPainter), | ||
| areCreateAndDispose, |
There was a problem hiding this comment.
@polina-c Probably an unfortunate typo in leak_tracker_flutter_testing but shouldn't this be named as areCreatedAndDisposed ?
There was a problem hiding this comment.
nope
the name is about events
the name states that the events are about creation and disposal, not that they are created and disposed
There was a problem hiding this comment.
I see. That indeed makes more sense.
navaronbracke
left a comment
There was a problem hiding this comment.
Just skimming through (I tend to keep an eye on leak tracker things :) )
| _textWidthBasis = textWidthBasis, | ||
| _textHeightBehavior = textHeightBehavior; | ||
| _textHeightBehavior = textHeightBehavior { | ||
| if (kFlutterMemoryAllocationsEnabled) { |
|
@polina-c, @navaronbracke thanks for the review. |
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
Description
TextPaintercreation and disposal dispatching for memory leak tracking as part of Clean up memory leaks in Flutter Framework, phase 2. #137311.Tests
text_painter_test.dartto testTextPainterobject creation and disposal dispatching;_SnackBarState;_SwitchPainter;_FlutterLogoPainter;RenderDecoratedBox;BannerPainter.Pre-launch Checklist
///).