mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 12:40:33 +02:00
EditorToolBar: Fix a memory leakage. Issue #26569, patch from G. Colla.
git-svn-id: trunk@46026 -
This commit is contained in:
parent
7e4fea476e
commit
4a1e95898b
@ -14,12 +14,17 @@
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseHeaptrc Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Description Value="Provides a configurable Toolbar in the source editor window, which can be positioned at any side. The toolbar comes with a predefined Jump button, and then Jump Forward and Jump Back buttons.
|
||||
"/>
|
||||
<License Value="GPL
|
||||
"/>
|
||||
<Version Minor="6" Release="2"/>
|
||||
<Version Minor="6" Release="3"/>
|
||||
<Files Count="4">
|
||||
<Item1>
|
||||
<Filename Value="jumpto_impl.pas"/>
|
||||
|
@ -157,15 +157,16 @@ begin
|
||||
end;
|
||||
|
||||
procedure TEditorToolbarList.SourceWindowDestroyed(Sender: TObject);
|
||||
var
|
||||
i: integer;
|
||||
aBar: TEditorToolbar;
|
||||
var
|
||||
i: integer;
|
||||
aBar: TEditorToolbar;
|
||||
begin
|
||||
// Let's remove from our list the destroyed window
|
||||
// Let's remove from our list the destroyed window and then destroy the ToolBar
|
||||
for i:= 0 to FToolBarList.Count -1 do begin
|
||||
aBar := TEditorToolbar(FToolBarList[i]);
|
||||
if aBar.OwnerWindow = TSourceEditorWindowInterface(Sender) then begin
|
||||
FToolBarList.Remove(aBar);
|
||||
DelBar(aBar);
|
||||
aBar.Free;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user