ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Out of memory error
Posted by Jonathan Hodges on Mar-05-2013 15:53
Using .Net V4.0 & VS2010

I had a puzzling problem where my application ran out of memory when I moved the mouse
across the chart.  Memory profiling showed a large number of byte arrays still attached to a
MemoryStream but no apparent owner.  I traced this down to the images being created by
updateDisplay().  It is important, every time you call updateDisplay() to call GC.Collect().
On high resolution screens, large blocks of memory are being allocated too quickly to be
collected between .net calls to GC.

The calls to GC.Collect() fixed the problem

  Re: Out of memory error
Posted by Peter Kwan on Mar-06-2013 02:17
Hi Jonathan,

Thanks a lot for your information. I am quite surprise this can cause out of memory issues, as I expect the .NET memory garbage collector will automatically free memory periodically and "when necessary". I will investigate in more details to see if we can reproduce the problem and how to resolve it.

Regards
Peter Kwan