Skip to content
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 instructions about disposal of image handle. #237

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions doc/leak_tracking/TROUBLESHOOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,17 @@ await tester.pumpAndSettle();

### 3. The test is leaking Image, ImageInfo or ImageStreamCompleterHandle

If your test is creating images that are designed to stay in the cache, you need to invoke `imageCache.clear()`
after the test.
Add it to`tearDownAll` to optimize for testing performance. Add it to`tearDown` to optimize for test isolation.
If your test is creating images that are designed to stay in the cache,
you need to invoke `imageCache.clear()` after the test.

Add it to:
* `tearDownAll` to optimize for testing performance
* `tearDown` to optimize for test isolation

Sometimes `imageCache.clear()` does not dispose the images handle, but schedules disposal
to happen after the rendering cycle completes.
If this is a case, `imageCache.clear()` needs to happen as last statement of the test,
instead of in tear down, to allow the cycles to happen.

## Get additional information

Expand Down