We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfCharts are not getting garbage collected when closed

Thread ID:

Created:

Updated:

Platform:

Replies:

142593 Feb 11,2019 04:18 PM UTC Feb 12,2019 12:13 PM UTC WPF 1
loading
Tags: SfChart
Doug Persons
Asked On February 11, 2019 04:18 PM UTC

My application consists of many data displays implemented as user controls that are opened and closed in tab pages on the main window.  The user controls should be garbage collected when the tab is closed and the control is removed from the tab page.  That works for all of the controls we currently use except for the user controls that contain an SfChart.  I've been testing with .NET Memory Profiler to analyze the problem. There are two instances where long-lived references to SfChart objects are keeping the charts alive after they should be garbage collected:  the ChartAxisLabels and the ChartZoomPanBehavior.

I'm attaching a small project adapted from your sample that demonstrates the problem: in this app you can add and remove tabs to the main window. The app is tracking the user controls with weak references to check if they are still alive: when the simple user control is closed, it gets garbage collected, but when the chart tab is closed, it does not.   Also included is a screen shot from the memory profile showing the object references.

Is there anything I can do to release these references so the chart will get garbage collected?



Attachment: GCTest1_24e3bc0.zip

Muneesh Kumar G [Syncfusion]
Replied On February 12, 2019 12:13 PM UTC

Hi Doug, 
 
Greetings, we were able to reproduce the issue “Memory leak in WPF chart” and we confirm this as a bug and logged a defect report already. You can keep track of the bug from the feedback portal below.  
   
   
The fix for the reported issue will be included in our nuget release which will be available on February 26th, 2019.  
  
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.  
    
Thanks,    
Muneesh Kumar G.   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;