diff options
author | Graeme Geldenhuys <graemeg@laptop.(none)> | 2010-07-22 13:54:53 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@laptop.(none)> | 2010-07-22 13:54:53 +0200 |
commit | 2aa6a7083e0047d9f0043fceed03c79476cebd75 (patch) | |
tree | 993085994105f90011d87bc793b36a11a6cfd0f2 /src | |
parent | 50180e4091e859649255a2e40b793e032eb85c9d (diff) | |
download | fpGUI-2aa6a7083e0047d9f0043fceed03c79476cebd75.tar.xz |
ListView: Fixed memory leak in ListView.Columns handling.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_listview.pas | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/fpg_listview.pas b/src/gui/fpg_listview.pas index 60698b2a..e07af511 100644 --- a/src/gui/fpg_listview.pas +++ b/src/gui/fpg_listview.pas @@ -24,6 +24,7 @@ interface uses Classes, SysUtils, + contnrs, fpg_base, fpg_main, fpg_widget, @@ -80,7 +81,7 @@ type TfpgLVColumns = class(TPersistent) private FListView: TfpgListView; - FColumns: TList; + FColumns: TObjectList; function GetColumn(AIndex: Integer): TfpgLVColumn; procedure SetColumn(AIndex: Integer; const AValue: TfpgLVColumn); public @@ -1564,6 +1565,7 @@ begin FItems.DeleteViewer(Self); FSelected.Free; FOldSelected.Free; + FColumns.Free; inherited Destroy; end; @@ -1630,7 +1632,7 @@ end; constructor TfpgLVColumns.Create(AListView: TfpgListView); begin FListView := AListView; - FColumns := TList.Create; + FColumns := TObjectList.Create; end; destructor TfpgLVColumns.Destroy; |