mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: Patch "Hotkey manager leak fix" [3398827].
This commit is contained in:
parent
2cc644d916
commit
fec2fc137d
3 changed files with 27 additions and 1 deletions
|
|
@ -1057,6 +1057,12 @@ var
|
|||
begin
|
||||
DCDebug('Destroying main form');
|
||||
|
||||
if Assigned(HotMan) then
|
||||
begin
|
||||
HotMan.UnRegister(edtCommand);
|
||||
HotMan.UnRegister(Self);
|
||||
end;
|
||||
|
||||
TDriveWatcher.RemoveObserver(@OnDriveWatcherEvent);
|
||||
TDriveWatcher.Finalize;
|
||||
DCDebug('Drive watcher finished');
|
||||
|
|
|
|||
|
|
@ -2796,6 +2796,13 @@ end;
|
|||
|
||||
destructor TColumnsFileView.Destroy;
|
||||
begin
|
||||
if Assigned(HotMan) then
|
||||
begin
|
||||
HotMan.UnRegister(edtFilter);
|
||||
HotMan.UnRegister(edtSearch);
|
||||
HotMan.UnRegister(dgPanel);
|
||||
end;
|
||||
|
||||
FreeThenNil(FSavedSelection);
|
||||
FreeThenNil(FColumnsSorting);
|
||||
inherited Destroy;
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ constructor THMBaseObject.Create(AName: String);
|
|||
begin
|
||||
FName := AName;
|
||||
FHotkeys := THotkeys.Create(True);
|
||||
FObjects := TFPObjectList.Create(False);
|
||||
FObjects := TFPObjectList.Create(True);
|
||||
end;
|
||||
|
||||
destructor THMBaseObject.Destroy;
|
||||
|
|
@ -919,6 +919,7 @@ var
|
|||
ParentForm: TCustomForm;
|
||||
form: THMForm;
|
||||
control: THMControl;
|
||||
i: Integer;
|
||||
begin
|
||||
ParentForm := GetParentForm(AControl);
|
||||
if Assigned(ParentForm) then
|
||||
|
|
@ -926,6 +927,18 @@ begin
|
|||
form := FForms.Find(ParentForm);
|
||||
if Assigned(form) then
|
||||
begin
|
||||
control := form.Controls.Find(AControl);
|
||||
if Assigned(control) then
|
||||
control.Delete(AControl);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// control lost its parent, find through all forms
|
||||
for i := 0 to FForms.Count - 1 do
|
||||
begin
|
||||
form := FForms[i];
|
||||
|
||||
control := form.Controls.Find(AControl);
|
||||
if Assigned(control) then
|
||||
control.Delete(AControl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue