Page 1 of 1

Memory leak in the Surface Series

Posted: Wed Feb 26, 2014 12:28 pm
by 16565588
I found a memory leak in the Surface series, will compile test1 program and after start will check memory by TaskManager

Re: Memory leak in the Surface Series

Posted: Thu Feb 27, 2014 3:42 pm
by yeray
Hello Vladimir,

I think with GDI it works better than with GDI+, could you please confirm it?
Delphi testing application:

Code: Select all

uses Chart, TeeGDIPlus, TeCanvas, TeeSurfa;

var Chart1: TChart;
    Series1: TSurfaceSeries;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1:=TChart.Create(Self);
  Chart1.Parent:=Self;
  Chart1.Align:=alClient;

  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  Series1:=Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries;
  Series1.FillSampleValues(128);

  RadioGroup1Click(Self);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var x, z: Integer;
begin
  for x:=0 to 127 do
    for z:=0 to 127 do
      Series1.Value[x,z]:=random(512);
end;

procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
  case RadioGroup1.ItemIndex of
    0: if Chart1.Canvas is TTeeCanvas3D then
          Chart1.Canvas:=TGDIPlusCanvas.Create;
    1: if Chart1.Canvas is TGDIPlusCanvas then
          Chart1.Canvas:=TTeeCanvas3D.Create;
  end;
end;
After confirming it, if you want you can add it to the bugzilla tracking system:
http://bugs.teechart.net/

Re: Memory leak in the Surface Series

Posted: Fri Feb 28, 2014 8:23 am
by 16565588
Hi Yeray
I've just checked with the GDI rendering, the bug exists also with the same rate of the memory leak.
By the way, this bug exists only in the last version of the TeeChart, the previous works fine, for this reason I am using now the previous version of the TeeChart (from November 2013).

The TColorBand bug (my other report) also is absent in the previous version.

Re: Memory leak in the Surface Series

Posted: Fri Feb 28, 2014 11:30 am
by narcis
Hi Vladimir,

Thanks for your feedback. I could reproduce the issue here and added it to the bug list (ID611). Please feel free to sign up at Steema Software's bugzilla platform to be able to get automatic issue update notifications.
anauta2014 wrote:The TColorBand bug (my other report) also is absent in the previous version.
It has just been fixed for the next maintenance release, see David Berneda's comment.

Re: Memory leak in the Surface Series

Posted: Fri Feb 28, 2014 2:04 pm
by narcis
Hi Vladimir,

This is not a memory leak, see David's comment.