Jedi code format: Fix memory leak.

This commit is contained in:
DomingoGP 2023-10-08 14:32:01 +02:00
parent 27d50a74a8
commit 8a98df0369
2 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,7 @@ uses
constructor TSourceTokenList.Create;
begin
fiCurrentTokenIndex := 0;
OwnsObjects := True;
OwnsObjects := False;
inherited Create(False);
end;

View File

@ -191,6 +191,7 @@ begin
{ if there was a parse error, the rest of the unit was not parsed
there may still be tokens in the list
Free them or face a small but annoying memory leak. }
lcTokenList.OwnsObjects := True;
lcTokenList.Clear;
end;