Page 1 of 1

Direct2D Memory Leak

Posted: Thu Mar 27, 2014 3:14 pm
by 15661641
Hi,
In our application, user can create and close charts dynamically.
But every time when user close any chart and create new one, memory usage increases.
In code, I dispose closed chart and remove it from form.

I created a simple application to show memory leaks.
In this application, every second with timer, I dispose current chart then create new one.
If I use Direct2D chart, memory usage increases in every timer tick.
But if I use GDI chart, memory usage is constant.

You can see the results by commenting following line in the Form1.cs
setD2D(tChart); // in CreateCharts() function


Thank you

Re: Direct2D Memory Leak

Posted: Thu Mar 27, 2014 3:21 pm
by 15661641
I forgot to write my environments.
Windows 7 OS
Visual Studio 2010
TeeChart for .NET 2013 4.1.2013.07300
SlimDX Runtime .NET 4.0 x86 (January 2012)

Re: Direct2D Memory Leak

Posted: Fri Mar 28, 2014 12:04 pm
by Christopher
Hello,
gcs wrote:You can see the results by commenting following line in the Form1.cs
setD2D(tChart); // in CreateCharts() function
I have been able to reproduce this issue here. Part of the issue has been fixed, as can be seen in id=681, but creating and disposing of a chart with a series in it still leaks memory, as recorded in id=682.

Re: Direct2D Memory Leak

Posted: Fri Mar 28, 2014 1:20 pm
by 15661641
Hello,

I tried the modified code in id=681.
It also has a memory leaks.

Can you check again please?

Re: Direct2D Memory Leak

Posted: Fri Mar 28, 2014 1:26 pm
by Christopher
gcs wrote:I tried the modified code in id=681.
It also has a memory leaks.

Can you check again please?
No, this code will not work for you because the fix required a change to the TeeChart.Direct2D.dll source code.