+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Memory is not released

print

(Vladimir Klamm) #1

Hello everyone, i get a problem with memory.
I load a background picture to my report with : fLLDB.LL.LlDefineVariableExtHandle('Report.Hintergrund', background.Handle, LL_DRAWING_HBITMAP);
I generate PDF file with background, than I set background pic to invisible and generate another one PDF file without background
So i call 2 times

fLLDB.LL.AutoDestination := adExport;
fLLDB.ExportType := ftPDF;
fLLDB.ExportFile     := '.\tmp\test_1.pdf';
fLLDB.print();
fLLDB.back := false;
fLLDB.ExportFile     := '.\tmp\test_2.pdf';
fLLDB.print();

The memory is not released after i do :
FreeAndNil(background);
But if i export only 1 PDF-File memory will be released.
I find out that memory size that not released is the size of background picture


(combit - Jochen Bartlau) #2

To the best of my knowledge, we do not mess with Delphi’s memory manager. Best thing would be to have a repro at hand. Could you try and see what happens if you destroy and recreate the background between the two passes? Do you still see any memory leaks? Would this be a viable workaround?


(Vladimir Klamm) #3

Thanks that was it! :grin: