mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-06 06:25:56 +02:00
Jedi code format: Fix memory leak.
This commit is contained in:
parent
27d50a74a8
commit
8a98df0369
@ -112,7 +112,7 @@ uses
|
|||||||
constructor TSourceTokenList.Create;
|
constructor TSourceTokenList.Create;
|
||||||
begin
|
begin
|
||||||
fiCurrentTokenIndex := 0;
|
fiCurrentTokenIndex := 0;
|
||||||
OwnsObjects := True;
|
OwnsObjects := False;
|
||||||
inherited Create(False);
|
inherited Create(False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -191,6 +191,7 @@ begin
|
|||||||
{ if there was a parse error, the rest of the unit was not parsed
|
{ if there was a parse error, the rest of the unit was not parsed
|
||||||
there may still be tokens in the list
|
there may still be tokens in the list
|
||||||
Free them or face a small but annoying memory leak. }
|
Free them or face a small but annoying memory leak. }
|
||||||
|
lcTokenList.OwnsObjects := True;
|
||||||
lcTokenList.Clear;
|
lcTokenList.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user