MG: fixed mem leak of componentinterfaces

git-svn-id: trunk@3356 -
This commit is contained in:
lazarus 2002-09-16 17:17:53 +00:00
parent 837b1b4d6d
commit 3d855574b7

View File

@ -570,7 +570,7 @@ Begin
{$IFDEF VerboseFormEditor}
writeln('TComponentInterface.Delete B ');
{$ENDIF}
Destroy;
Free;
Result := True;
end;
@ -635,6 +635,7 @@ var
AForm: TCustomForm;
Begin
Temp := TComponentInterface(FindComponent(Value));
writeln('TCustomFormEditor.DeleteControl ',HexStr(Cardinal(Temp),8),' ',HexStr(Cardinal(Value),8),' ',Value.Name,':',Value.ClassName);
if Temp <> nil then
begin
RemoveFromComponentInterfaceList(Temp);
@ -650,7 +651,7 @@ Begin
if not (AForm is TForm) then
writeln('WARNING: TCustomFormEditor.DeleteControl ',AForm.ClassName);
JITFormList.DestroyJITForm(TForm(AForm));
Temp.Destroy;
Temp.Free;
end
else
Temp.Delete;