diff options
author | Jean-Marc Levecque <jean-marc.levecque@jmlesite.fr> | 2011-10-30 16:30:20 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-10-31 09:24:32 +0200 |
commit | eb25663480909bee9d1b826719d471cc1aa60a76 (patch) | |
tree | 950553935925f347917a02dc17e56ff482ca1124 /extras/contributed/report_tool/reportengine/u_imprime.pas | |
parent | 4a83a1d699412656f976a59b017bd8252d31abc6 (diff) | |
download | fpGUI-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.pas | 22 |
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; |