Direct2D Memory Leak

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
gcs
Newbie
Newbie
Posts: 8
Joined: Tue Feb 21, 2012 12:00 am

Direct2D Memory Leak

Post by gcs » Thu Mar 27, 2014 3:14 pm

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
Attachments
DemoProjectDirect2D.rar
(12.81 KiB) Downloaded 530 times

gcs
Newbie
Newbie
Posts: 8
Joined: Tue Feb 21, 2012 12:00 am

Re: Direct2D Memory Leak

Post by gcs » Thu Mar 27, 2014 3:21 pm

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)

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Direct2D Memory Leak

Post by Christopher » Fri Mar 28, 2014 12:04 pm

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.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

gcs
Newbie
Newbie
Posts: 8
Joined: Tue Feb 21, 2012 12:00 am

Re: Direct2D Memory Leak

Post by gcs » Fri Mar 28, 2014 1:20 pm

Hello,

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

Can you check again please?

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Direct2D Memory Leak

Post by Christopher » Fri Mar 28, 2014 1:26 pm

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.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply