Internal objects (SKCanvasView, MotionCanvas, etc) not getting disposed #1725
Labels
not verified
It is probably an issue, but we have not enough evidence to mark this as a bug.
possible bug [unconfirmed]
Describe the bug
Some resources used by the CartasianChart (and possibly others) are not released when the view is no longer being used. The context in which we found this issue is while navigating through content pages. When a page is navigated away from, all its resources should be released and reclaimed by the garbage collector, however not all objects created by the CartasianChart are properly released and stay in memory.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All objects created by CartasianChart are released and cleaned up by the garbage collector.
Screenshots
Consistent increase in memory footprint after navigating to/from page with chart multiple times
Note the warnings from the Maui memory toolkit about orphaned objects.
Memory snapshot after navigating away from page with CartasianChart. Skia and Canvas objects are still present in memory
Desktop (please complete the following information):
Additional context
Please see attached project to that illustrates the issue: https://github.com/jo-ruch/LiveCharts2MauiMemoryLeakDemo/tree/main
The text was updated successfully, but these errors were encountered: