Page 1 of 1

Teechart memory leak when writing PDF?

Posted: Mon Oct 31, 2005 8:34 pm
by 9336419
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;

Posted: Mon Nov 07, 2005 9:43 am
by Pep
Hi Brian,

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

Posted: Thu Jan 12, 2006 3:58 pm
by 9336419
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

Posted: Sun Jan 15, 2006 6:16 pm
by Pep
Hi Brian,

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