Page 1 of 1

Problem with tmarkserie

Posted: Sat Feb 14, 2004 12:49 pm
by 8439226
Hello all.
I'm using Delphi 5, with Teechart 6.0.1
I'm having memory problems. This is what I want to do, and then how I do it. Then the problem.
I'm getting values (from COM1) and I'm displaying them on a chart. I'm using a TlineSeries to do this. I want the marks of the points to be visible, so the user can see each value. I only want to display the last 25 values on the chart. The others, I can ignore them, so the series don't keep growing and growing. So I'm deleting them.
So what I'm doing is this:

if series1.count>25 then
begin
series1.Delete(0);
end;

I'm also moving the bottomaxis range, so it keeps moving with the series.
The problem is when deleting the series value, the mark, don't seem to be deleted, since i get a memory leak of the deleted values.
The leak is this:

*** MEMCHK: Chronological leak information ***

* Instance of TSeriesMarkPosition (Leak #0) Size: 44
* Instance of TSeriesMarkPosition (Leak #0) Size: 44

*** MEMCHK: End of chronological leak information ***

Any tips? Is this a bug? ANy other way to do what I want to do?
Thanks

Posted: Sun Feb 15, 2004 6:53 pm
by Pep
Hi Gonçalo,

have you tried removing the non visible values using similar code of the example you can find in the Demo Features project of the TeeChart Pro v6.01 under :
All Features -> Welcome ! -> Chart Styles -> Standard -> Fast Line -> Fast Delete and Fast pen.
?