GDI resource leak in v2010
Posted: Mon May 17, 2010 7:03 am
Hi,
I'm using the v2010 version and it seems, I’ve encountered a GDI resource problem when using GDI+.
When I set the transparency of say a TBarSeries and use TTeeGDIPlus to render it, I’ve noticed that the number of GDI handles steadily increases whenever a repaint occurs.
I’ve tried to find out why and noticed a difference between the TeCanvas implementation and the GDIPlusCanvas one:
While in TeCanvas the Blend is freed:
procedure TTeeCanvas.EndBlending(Blend:TTeeBlend);
begin
Blend.DoBlend(ITransp);
Blend.Free;
end;
it isn’t in the GDI+ one:
procedure TGDIPlusCanvas.EndBlending(Blend:TTeeBlend);
begin
Transparency:=255;
end;
Could this be the reason?
I'm using the v2010 version and it seems, I’ve encountered a GDI resource problem when using GDI+.
When I set the transparency of say a TBarSeries and use TTeeGDIPlus to render it, I’ve noticed that the number of GDI handles steadily increases whenever a repaint occurs.
I’ve tried to find out why and noticed a difference between the TeCanvas implementation and the GDIPlusCanvas one:
While in TeCanvas the Blend is freed:
procedure TTeeCanvas.EndBlending(Blend:TTeeBlend);
begin
Blend.DoBlend(ITransp);
Blend.Free;
end;
it isn’t in the GDI+ one:
procedure TGDIPlusCanvas.EndBlending(Blend:TTeeBlend);
begin
Transparency:=255;
end;
Could this be the reason?