mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 12:09:21 +02:00
fixed memleak on published var completion from Vincent
git-svn-id: trunk@4998 -
This commit is contained in:
parent
7c8f973a48
commit
37a33a8594
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user