fixed memleak on published var completion from Vincent

git-svn-id: trunk@4998 -
This commit is contained in:
mattias 2004-01-03 12:17:25 +00:00
parent 7c8f973a48
commit 37a33a8594

View File

@ -548,6 +548,7 @@ var
CleanMethodDefinition, MethodDefinition: string; CleanMethodDefinition, MethodDefinition: string;
FindContext: TFindContext; FindContext: TFindContext;
begin begin
try
Result:=false; Result:=false;
if (ClassNode=nil) or (ClassNode.Desc<>ctnClass) or (AMethodName='') if (ClassNode=nil) or (ClassNode.Desc<>ctnClass) or (AMethodName='')
or (ATypeInfo=nil) or (SourceChangeCache=nil) or (Scanner=nil) then exit; or (ATypeInfo=nil) or (SourceChangeCache=nil) or (Scanner=nil) then exit;
@ -598,6 +599,9 @@ begin
writeln('[TEventsCodeTool.CreatePublishedMethod] END'); writeln('[TEventsCodeTool.CreatePublishedMethod] END');
{$ENDIF} {$ENDIF}
Result:=true; Result:=true;
finally
FreeClassInsertionList;
end;
end; end;
function TEventsCodeTool.CreateExprListFromMethodTypeData( function TEventsCodeTool.CreateExprListFromMethodTypeData(
@ -720,6 +724,7 @@ var
UpperCurComponentName: String; UpperCurComponentName: String;
VarType: String; VarType: String;
begin begin
try
Result:=false; Result:=false;
BuildTree(false); BuildTree(false);
if not EndOfSourceFound then exit; if not EndOfSourceFound then exit;
@ -767,6 +772,9 @@ begin
writeln('[TEventsCodeTool.CompleteComponent] END'); writeln('[TEventsCodeTool.CompleteComponent] END');
{ $ENDIF} { $ENDIF}
Result:=true; Result:=true;
finally
FreeClassInsertionList;
end;
end; end;
function TEventsCodeTool.FindIdentifierNodeInClass(ClassNode: TCodeTreeNode; function TEventsCodeTool.FindIdentifierNodeInClass(ClassNode: TCodeTreeNode;