fixed memleak on exception

git-svn-id: trunk@9714 -
This commit is contained in:
mattias 2006-08-10 23:01:34 +00:00
parent f863fe8262
commit d6550769d0

View File

@ -6470,6 +6470,7 @@ var ExprType: TExpressionType;
ExprStartPos, ExprEndPos: integer;
CurIgnoreErrorAfterPos: Integer;
OldFlags: TFindDeclarationFlags;
ok: Boolean;
procedure RaiseBracketNotFound;
begin
@ -6482,6 +6483,8 @@ begin
'"',copy(Src,StartPos,40),'" Context=',Params.ContextNode.DescAsString);
{$ENDIF}
Result:=TExprTypeList.Create;
ok:=false;
try
MoveCursorToCleanPos(StartPos);
ReadNextAtom; // reads first atom after proc name
if AtomIsChar('(') then
@ -6536,6 +6539,10 @@ begin
'ParamCount=',dbgs(Result.Count),' "',copy(Src,StartPos,40),'"');
DebugLn(' ExprList=[',Result.AsString,']');
{$ENDIF}
Ok:=true;
finally
if not Ok then Result.Free;
end;
end;
function TFindDeclarationTool.CreateParamExprListFromProcNode(