summaryrefslogtreecommitdiff
path: root/extras/contributed/report_tool/reportengine/u_imprime.pas
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2011-10-30 16:30:20 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-10-31 09:24:32 +0200
commiteb25663480909bee9d1b826719d471cc1aa60a76 (patch)
tree950553935925f347917a02dc17e56ff482ca1124 /extras/contributed/report_tool/reportengine/u_imprime.pas
parent4a83a1d699412656f976a59b017bd8252d31abc6 (diff)
downloadfpGUI-eb25663480909bee9d1b826719d471cc1aa60a76.tar.xz
Report tool: more memory leak fixes in Imprime and PDF units.
Diffstat (limited to 'extras/contributed/report_tool/reportengine/u_imprime.pas')
-rw-r--r--extras/contributed/report_tool/reportengine/u_imprime.pas22
1 files changed, 19 insertions, 3 deletions
diff --git a/extras/contributed/report_tool/reportengine/u_imprime.pas b/extras/contributed/report_tool/reportengine/u_imprime.pas
index 6952ee3f..3c5ca114 100644
--- a/extras/contributed/report_tool/reportengine/u_imprime.pas
+++ b/extras/contributed/report_tool/reportengine/u_imprime.pas
@@ -2125,6 +2125,24 @@ then
Bords.Free;
Textes.Free;
ALigne.Free;
+if PdfPage.Count> 0
+then
+ for Cpt:= 0 to Pred(PdfPage.Count) do
+ if TPdfElement(PdfPage[Cpt]) is TPdfTexte
+ then
+ TPdfTexte(PdfPage[Cpt]).Free
+ else
+ if TPdfElement(PdfPage[Cpt]) is TPdfRect
+ then
+ TPdfRect(PdfPage[Cpt]).Free
+ else
+ if TPdfElement(PdfPage[Cpt]) is TPdfLine
+ then
+ TPdfLine(PdfPage[Cpt]).Free
+ else
+ if TPdfElement(PdfPage[Cpt]) is TPdfSurf
+ then
+ TPdfSurf(PdfPage[Cpt]).Free;
PdfPage.Free;
DecimalSeparator:= OldSeparator;
inherited;
@@ -2175,9 +2193,7 @@ then
FPreparation:= ppVisualise;
try
ImprimeDocument;
- if FVisualisation
- then
- F_Visu.ShowModal;
+ F_Visu.ShowModal;
finally
F_Visu.Free;
end;