Teecreatebitmap
Posted: Wed Aug 05, 2009 9:35 pm
I'm using code below to make gf files of chart, the loop can be executed many hundreds of times. There appears to be a memory leak with this, should I be freeing something after the call to teecreatebitmap?
thans
Sean
tmpgif:=tgifimage.Create;
for c:=1 to no_of_var do
begin
get_chart1;
with tmpgif do
begin
compression:=gcLZW;
dithermode:=dmstucki;
colorreduction:=rmquantizewindows;
begin
assign(chart1.TeeCreateBitmap(chart1.Color,rect(0,0,chart1.Width,chart1.Height)));
savetofile(fname1);
end
end;
end;
tmpgif.Free;
thans
Sean
tmpgif:=tgifimage.Create;
for c:=1 to no_of_var do
begin
get_chart1;
with tmpgif do
begin
compression:=gcLZW;
dithermode:=dmstucki;
colorreduction:=rmquantizewindows;
begin
assign(chart1.TeeCreateBitmap(chart1.Color,rect(0,0,chart1.Width,chart1.Height)));
savetofile(fname1);
end
end;
end;
tmpgif.Free;