Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

fix: destroy chart on dispose #780

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 6 additions & 0 deletions charts_flutter/lib/src/chart_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ class ChartContainerRenderObject<D> extends RenderCustomPaint
a11yNodes: _a11yNodes ?? [],
textDirection: textDirection);
}

@override
void dispose() {
_chart!.destroy();
super.dispose();
}
}

class ChartContainerCustomPaint extends CustomPainter {
Expand Down