diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-10-25 12:48:16 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-10-25 12:48:16 +0200 |
commit | 3a9d33431e7fdbbfa59b048be5b294f7ca37e448 (patch) | |
tree | 5a3fdcc3be45b1d1df473b0d5d562ce95ebebfe9 /extras | |
parent | 6a68cf407df9149eafaee368cbb990567ddf714a (diff) | |
download | fpGUI-3a9d33431e7fdbbfa59b048be5b294f7ca37e448.tar.xz |
pdf report: fixed memory leak. Font was not freed.
Diffstat (limited to 'extras')
-rw-r--r-- | extras/contributed/report_tool/reportengine/u_commande.pas | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extras/contributed/report_tool/reportengine/u_commande.pas b/extras/contributed/report_tool/reportengine/u_commande.pas index 0c35c44b..dfcd7afd 100644 --- a/extras/contributed/report_tool/reportengine/u_commande.pas +++ b/extras/contributed/report_tool/reportengine/u_commande.pas @@ -251,6 +251,7 @@ type FSize: string; public constructor Create(AFonte: string; AColor: TfpgColor); virtual; + destructor Destroy; override; function GetHeight: Integer; property GetFonte: TfpgFont read FFonte; property GetColor: TfpgColor read FColor; @@ -736,6 +737,12 @@ FColor:= AColor; FSize:= ExtractFontSize(AFonte); end; +destructor T_Fonte.Destroy; +begin + FFonte.Free; + inherited Destroy; +end; + function T_Fonte.GetHeight: Integer; begin Result:= TfpgFont(FFonte).Height; |