-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add disposal mechanism for created Layers to TestRecordingPaintingContext. #134768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add disposal mechanism for created Layers to TestRecordingPaintingContext. #134768
Conversation
|
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. |
|
The PR is not test covered as it is first step to fix #134575, that is test covered: https://discord.com/channels/608014603317936148/608018585025118217/1151990555807580171 |
|
test-exempt: preparing for extra testing |
hannah-hyj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/flutter@e5e36ad...1b18b13 2023-09-17 [email protected] Roll Flutter Engine from e07bb975ee85 to 57a4ff3c7ff8 (1 revision) (flutter/flutter#134895) 2023-09-17 [email protected] Roll Flutter Engine from 444689fd4060 to e07bb975ee85 (1 revision) (flutter/flutter#134889) 2023-09-16 [email protected] Roll Flutter Engine from 8c2203bb6c3b to 444689fd4060 (1 revision) (flutter/flutter#134886) 2023-09-16 [email protected] Fix memory leak in CupertinoActionSheet (flutter/flutter#134885) 2023-09-16 [email protected] Add disposal mechanism for created Layers to TestRecordingPaintingContext. (flutter/flutter#134768) 2023-09-16 [email protected] Manual roll Flutter Engine from 490925676b91 to 8c2203bb6c3b (6 revisions) (flutter/flutter#134882) 2023-09-16 [email protected] Manual roll Flutter Engine from cdcbdcc7ccba to 490925676b91 (5 revisions) (flutter/flutter#134879) 2023-09-16 [email protected] Manual roll Flutter Engine from 30b7e9ded7a0 to cdcbdcc7ccba (5 revisions) (flutter/flutter#134877) 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://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
| canvas.restore(); | ||
| return OpacityLayer(); | ||
| final OpacityLayer layer = OpacityLayer(); | ||
| _createdLayers.add(layer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said on #134701 (comment), this is likely not the right fix. If I remember correctly, the contract of PaintingContext (which defines this method) is that the caller assumes ownership of the Layer and is in charge of disposing it. If this change is in fact "fixing" any leaks, it is only doing so for the test. In production (where a regular PaintContext and not the testing version is used) this leak is still present!
…text. (flutter#134768) Contributes to flutter#134575
Contributes to #134575