MSDN Archive Home
Help and FAQs
Samples Environment for Microsoft Chart Controls
All Resource Updates
Create New Discussion
How to Free Memory?
May 31 2012 at 1:08 PM
In one of my projects I'm using MS Chart Controls. Just a short description to understand my Problem. The main idea of the programm is that the user can create different charts with different data. Furhter the user can also remove any charts.
And there is my problem: How can I remove the data which are related to the chart?
I'm using the DataSource Property of the class Chart to display the data:
MyChart.DataSourceChart = dtLeaf;
But how I can remove the data? I tried it in the following way:
foreach (Series s in chart.Series)
But I recoginized the allocated memeory of the program is the same as before (I'm using resource monitor and task manager in Win7)
I thought the garabge collection will remove the data, but if I'm running the programm more than 2 minutes the memory is still the same.
I hope you can help me? Thanks in advance
Sign in to post message or set email notifications
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.