Direct2D Memory Leak
Posted: 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
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