1. Make a new VCL application
2. Drop a TChart component on the main form
3. Edit the TChart: Edit Chart->Chart->3D->render and select GDI instead of GDI+
4. Run the application and close it
using any debug-memory manager of your choice will show you the leek...
As far as I could trace the error it happens in:
Code: Select all
procedure TCustomTeePanel.CreateDefaultCanvas;
var t : Integer;
tmp,
tmpClass : TCanvas3DClass;
begin
tmpClass:=TTeeCanvas3D;
if IDefaultCanvas<>'' then
for t:=0 to TeeRenderClasses.Count-1 do
begin
tmp:={$IFNDEF D18}TCanvas3DClass{$ENDIF}(TeeRenderClasses[t]);
if tmp.ClassName=IDefaultCanvas then
begin
tmpClass:=tmp;
break;
end;
end;
if (not Assigned(InternalCanvas)) or (tmpClass<>InternalCanvas.ClassType) then
begin
InternalCanvas:=tmpClass.Create;
InternalCanvas.ReferenceCanvas:=FDelphiCanvas;
end;
end;
Maybe the only thing to do, is to Free the InternalCanvas:
Code: Select all
if (not Assigned(InternalCanvas)) or (tmpClass<>InternalCanvas.ClassType) then
begin
if Assigned(InternalCanvas) then
InternalCanvas.Free;
InternalCanvas:=tmpClass.Create;
InternalCanvas.ReferenceCanvas:=FDelphiCanvas;
end;
/Edit: Using Delphi XE4 - TeeChart Pro v2013.08.130521 32bit VCL