Hello,
I am trying to use a xamChart to display a set of 1000 data points. Every one millisecond i want to assign a new set of 1000 data points to the chart. I am able to do this and see an average speed of 13Hz.
The problem that i see is when the program is running and i open Task Manger, the memory consumed by this process continually increases from a couple thousand kilobytes till i killed it at 1gb of memory usage.
I am not storing the data after i swap it out, and cannot find out what piece of code is retaining this data in memory.
I have even tried to call GC.Collect() but that did not help the memory reduce.
I have attached the Visual studio 2010 solution file.
Any help is appreciated!
HI Steven,
When looking into this inquiry, I noticed that you resolved this with our engineers through a private support case. I am posting their advice here for the benefit of others who may encounter this issue:
To paraphrase:
The same behavior is present after removing the xamchart and replacing it with a datagrid or listbox. A memory profiler will indicate that many of the Frequency objects are not being released from memory. Increasing the timer interval fixes this problem. Perhaps it would help to do the data generation on a worker thread, and then update the DataSource through the dispatcher, using an interval more appropriate for UI operations, like 50-100ms.
Thanks,