Repository navigation
Dispose widgets to stop leaks. - #108193
Conversation
| void dispose() { | ||
| activity?.dispose(); // it will be null if it got absorbed by another ScrollPosition | ||
| _activity = null; | ||
| isScrollingNotifier.dispose(); |
There was a problem hiding this comment.
Great to see the leak detection tool catching issues like this!
| // We disable these lints, because they relate to InkResponseState | ||
| // that is actually private, but visible for testing. | ||
| // ignore_for_file: public_member_api_docs, library_private_types_in_public_api |
There was a problem hiding this comment.
Please don't do this. We should try to keep that object private.
If we can't keep it private, we will have to add docs. But We should really try hard to not make this public.
There was a problem hiding this comment.
Agreed.
We normally do not test disposal as the testing is complicated. So, I rolled back testing and will request the testing exempt. When we release the leak detector, we will be able to test cover such things.
|
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 on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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. |
|
test-exempt: will be tested by #108322 |
The leaks are detected by leak-tracker for money app.
We will test cover the change after the leak tracker release.