Stopping FastLineSeries deallocation/reallocation of memory
Posted: Tue May 02, 2006 12:49 pm
I am using FastLineSeries to plot arrays of up to 1,000,000 points, but I plot them as they are acquired in a data acquisition system, about 2000 pts every 100 msec. To do this I am using FastLineSeries->AddXY() to add points every 100 msec, and FastLineSeries->Clear() to clear the chart every minute or so.
When I watch the "Mem Usage" value in the Windows Task Manager I see it slowly increase as the plotting begins (indicating additional memory allocation) and this continues up to when the plot is Cleared() at which time the "Mem Usage" rapidly drops down (deallocation). Then gradually the "Mem Usage" begins increasing again when plotting again starts. This repeated deallocation/reallocation of memory is very wasteful.
Is there any way I can control when the deallocation occurs, but have allocation continue if more is eventually needed?
Alternatively, I understand I could use Direct Dynamic Arrays and use SetLength() to directly allocate the memory once and maybe change its size when needed.
Do I need to upgrade from version 6.0 to 7 to use SetLength() and Direct Dynamic Arrays?
I am using C++Builder 6 and VCL TeeChart Pro 6.0.
Thank you.
Bill Anderson
When I watch the "Mem Usage" value in the Windows Task Manager I see it slowly increase as the plotting begins (indicating additional memory allocation) and this continues up to when the plot is Cleared() at which time the "Mem Usage" rapidly drops down (deallocation). Then gradually the "Mem Usage" begins increasing again when plotting again starts. This repeated deallocation/reallocation of memory is very wasteful.
Is there any way I can control when the deallocation occurs, but have allocation continue if more is eventually needed?
Alternatively, I understand I could use Direct Dynamic Arrays and use SetLength() to directly allocate the memory once and maybe change its size when needed.
Do I need to upgrade from version 6.0 to 7 to use SetLength() and Direct Dynamic Arrays?
I am using C++Builder 6 and VCL TeeChart Pro 6.0.
Thank you.
Bill Anderson