mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 22:40:30 +02:00
* Some memory leak fixes from Vincent Snijders
git-svn-id: trunk@16306 -
This commit is contained in:
parent
d1264eeb3a
commit
121cef51d2
@ -1440,6 +1440,8 @@ begin
|
||||
(e.g. in Constants) }
|
||||
if Assigned(VarType) then
|
||||
VarType.Release;
|
||||
if Assigned(Expr) then
|
||||
Expr.Release;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
@ -3093,16 +3093,15 @@ begin
|
||||
begin
|
||||
Variant := TPasVariant(CreateElement(TPasVariant, '', Parent));
|
||||
Parent.Variants.Add(Variant);
|
||||
Variant.Values := TStringList.Create;
|
||||
while True do
|
||||
begin
|
||||
Variant.Values.Add(ParseExpression(Parent));
|
||||
NextToken;
|
||||
if CurToken = tkColon then
|
||||
break
|
||||
else if CurToken <> tkComma then
|
||||
ParseExc(SParserExpectedCommaColon);
|
||||
end;
|
||||
Variant.Values.Add(ParseExpression(Parent));
|
||||
NextToken;
|
||||
if CurToken = tkColon then
|
||||
break
|
||||
else if CurToken <> tkComma then
|
||||
ParseExc(SParserExpectedCommaColon);
|
||||
end;
|
||||
ExpectToken(tkBraceOpen);
|
||||
Variant.Members := TPasRecordType(CreateElement(TPasRecordType, '',
|
||||
Variant));
|
||||
|
Loading…
Reference in New Issue
Block a user