BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
A child window containing only SfChart with a legend remains in memory after closing the window. The SfChart is disposed properly when it has no legend defined. For a sample test case, I've tried LineSeries and Doughnut Chart series separately and each with a simple legend definition as:
<chart:SfChart.Legend>
<chart:ChartLegend/>
</chart:SfChart.Legend>
Thanks.
Hi Miftah,
Thanks for your patience. We are validating the reported memory leak issue and will update the complete details in two business days (21.12.2022).
Regards,
Nanthini Mahalingam.
Hi Miftah,
We have analyzed your query, and we can remove our chart control from the memory by calling chart's dispose method when we close the window as per the below code snippet.
private void Window_Closed(object sender, EventArgs e) { if (this.chart != null) { chart.Dispose(); } } |
If you have any questions, please let me know.
Regards,
Nanthini Mahalingam.
Hi Nanthini,
As I explained in my problem description, I'm facing the issue when there is a legend definition for the chart. I had also confirmed that the chart is disposed properly when there is no legend definition.
Your sample attachment does not contain any legend defn.
Thanks.
We apologize for the inconvenience, and we have modified our sample with legend. And we have attached memory snapshot in chart loaded time below.
We have removed the chart from the memory by calling chart’s dispose method while closing the child window. We have attached after window closing memory snapshot below.
Sample file is attached below.
If you have any queries, please let me know.
Hi Nanthini,
Yes so far it's ok. Now I've attached the modified version of your sample to reproduce the problem. Here I'm starting the child window from the main window's notifyicon context menu. Without a legend, we don't see the child window in memory after closing it whereas a legend will keep the child window and I've shared its retention path. Please have a look.
Thanks.
Sorry for inconvenience,
We have reproduced the memory leak issue on our end, we are working on a solution for it. We will provide a solution for this issue on or before December 29th, 2022.
We have analyzed the memory leak issue that is caused by the automation peer class. The WPF components hold some memory that needs to be released manually.
Please refer to the following document, which will be helpful in overcome this issue.
Please contact us if you will need any further assistance.
Hi Nanthini,
This solution has solved my problem.
Thanks a lot for your support.
Hi Miftah,
We are glad that the provided response
meets your requirement. Please let us know if you need further assistance. As
always, we are happy to help you out.
Regards,
Preethi R