Print to file causes memory leaks
Hi,
I got a problem need to be fixed. Please help me.
After print a report which have a lot images to a file, the memory hold by
the program keeps in a high level after a little bit drop.
If I print the report repeat, the memory hold by the program keeps going up
until an error message shown up. I have even tried to make the image picture
= nil after printing, but that not help. However if images in the report are
not assigned before printing the report, the memory will keep low.
Could you please tell me how I can free the memory after print the report to
a file to make it as low as before printing?
Thanks
I got a problem need to be fixed. Please help me.
After print a report which have a lot images to a file, the memory hold by
the program keeps in a high level after a little bit drop.
If I print the report repeat, the memory hold by the program keeps going up
until an error message shown up. I have even tried to make the image picture
= nil after printing, but that not help. However if images in the report are
not assigned before printing the report, the memory will keep low.
Could you please tell me how I can free the memory after print the report to
a file to make it as low as before printing?
Thanks
This discussion has been closed.
Comments
Please specify which version of ReportBuilder and Delphi you are using as
well as some more specifics on your application. Which device are you using
to export your report to file?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Version 10.07 and also TExtraDevices 2.97.
The code to print the report as following:
with rpt do
begin
DeviceType := 'PDFFile';
AllowPrintToFile := True;
ShowPrintDialog := false;
ShowAutoSearchDialog :=false;
ShowCancelDialog := false;
Print;
end;
This report have some images inside, before printing, pictures were loaded.
I check the memory usage via Windows Task Manager. After printing each time,
the program 'Mem Usage' is increased by 2 - 3 MB.
Thanks for the information.
Checking the Windows Task Manager is not always a valid way to check the
memory usage of an appliction. I would suggest using a memory manager such
as FastMM or AQTime.
Have you tried using the built-in PDF device included with ReportBuilder?
Perhaps this will give you better results.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
By using FastMM, I found the code which causing memory leak. It is not a RB
or TXtraDevice problem.