Teechart memory leak when writing PDF?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bfrost
Newbie
Newbie
Posts: 7
Joined: Fri Mar 12, 2004 5:00 am
Location: United Kingdom

Teechart memory leak when writing PDF?

Post by bfrost » Mon Oct 31, 2005 8:34 pm

Hi,
I have added PDF export to my list of exported chart format and notice that there seems to be a memory leak with OffsetList - see below. Is it the way I'm using it or do I see OffsetList is not being freed, only cleared in Destroy?
Regards,
Brian

constructor TTeePDFPage.Create;
begin
inherited Create;
IObjCount := 0;
FChartObject := TPDFChartObject.Create;
OffsetList := TStringList.Create;
end;

destructor TTeePDFPage.Destroy;
begin
FChartObject.Free;
OffsetList.Clear;
inherited;
end;

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

Post by Pep » Mon Nov 07, 2005 9:43 am

Hi Brian,

could you please show me how can I reproduce the problem ?

bfrost
Newbie
Newbie
Posts: 7
Joined: Fri Mar 12, 2004 5:00 am
Location: United Kingdom

Post by bfrost » Thu Jan 12, 2006 3:58 pm

Pep wrote:Hi Brian,

could you please show me how can I reproduce the problem ?
Hi Pep,

Sorry to have taken so long to reply. I dont have a clean and simple chart to give you to demo the problem, but am I being naieve? Surely OffsetList is never Free'd anywhere? I entered OffsetList.Free in Destroy and the problem goes away fine.

Does this help?
Regards,
Brian

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

Post by Pep » Sun Jan 15, 2006 6:16 pm

Hi Brian,

yes, this could be the cause, I'll review and change in the sources.
Thanks!.

Post Reply