Problem with tmarkserie

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Gonçalo
Newbie
Newbie
Posts: 1
Joined: Fri Nov 15, 2002 12:00 am
Location: Portugal
Contact:

Problem with tmarkserie

Post by Gonçalo » Sat Feb 14, 2004 12:49 pm

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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sun Feb 15, 2004 6:53 pm

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.
?

Post Reply