'fastreport tfrxpdfexport leaks memory Version 4.0
i have While loop every loop I Create Object from TInvoice_Business_Data then Call Print Method to save PDF File but after 200 File Saved Memory Is Full Take 4 GB
To Fix Problem I Must Close EXE
procedure TInvoice_Business_Data.Print(Ab_SaveNotPrint, As_PDF_FileName: string = '');
var
thr:TThread;
begin
if Ab_SaveNotPrint then
begin
frxReport.EngineOptions.SilentMode := True;
frxReport.EngineOptions.EnableThreadSafe := True;
frxReport.EngineOptions.DestroyForms:= False;
frxReport.EngineOptions.UseFileCache:= False;
thr:= TThread.CurrentThread;
frxReport.EngineOptions.ReportThread:=thr;
frxReport.PrepareReport();
frxPDFExport.FileName := As_PDF_FileName;
frxPDFExport.ShowDialog := False;
frxPDFExport.ShowProgress := False;
frxPDFExport.EmbeddedFonts := True;
frxReport.Export(frxPDFExport);
end
else
begin
frxReport.ShowReport();
end;//if..else.
end;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
