fix #94 - explorer, list of favorite create leaks on exit

This commit is contained in:
Basile Burg 2021-09-23 03:07:22 +02:00
parent 9e156b6fa7
commit 477ec85722
1 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, ListViewFilterEdit, Forms, strutils , Classes, SysUtils, FileUtil, ListViewFilterEdit, Forms, strutils ,
Controls, Graphics, ExtCtrls, Menus, ComCtrls, Buttons, lcltype, dialogs, Controls, Graphics, ExtCtrls, Menus, ComCtrls, Buttons, lcltype, dialogs,
u_widget, u_sharedres, u_common, u_interfaces, u_observer, u_widget, u_sharedres, u_common, u_interfaces, u_observer, LCLVersion,
u_writableComponent, u_dubproject, u_ceproject, EditBtn, ShellCtrls, u_writableComponent, u_dubproject, u_ceproject, EditBtn, ShellCtrls,
u_dialogs, u_synmemo, u_projutils, u_dsgncontrols, u_stringrange, Types; u_dialogs, u_synmemo, u_projutils, u_dsgncontrols, u_stringrange, Types;
@ -372,7 +372,10 @@ begin
end; end;
destructor TMiniExplorerWidget.destroy; destructor TMiniExplorerWidget.destroy;
var
i: integer;
begin begin
fMnxSubj.free; fMnxSubj.free;
EntitiesConnector.removeObserver(self); EntitiesConnector.removeObserver(self);
with TMiniExplorerOptions.create(nil) do with TMiniExplorerOptions.create(nil) do
@ -383,6 +386,11 @@ begin
free; free;
end; end;
{$if lcl_fullversion >= 2020000}
for i := 0 to lstFav.Items.Count-1 do
lstFavDeletion(nil, lstfav.Items[i]);
{$endif}
fEditableOptions.Free; fEditableOptions.Free;
fFavorites.Free; fFavorites.Free;
inherited; inherited;