MG: fixed memleaks

git-svn-id: trunk@2424 -
This commit is contained in:
lazarus 2002-08-17 23:41:21 +00:00
parent 115a37923c
commit 45c40ec1f9

View File

@ -54,7 +54,7 @@ var
function SendApplicationMessage(Msg: Cardinal; WParam, LParam: Longint):Longint;
procedure OwnerFormDesignerModified(AComponent: TComponent);
function OffSetRect(var ARect: TRect; dx,dy: Integer): Boolean;
procedure FreeThenNil(var AnObject: TObject);
implementation
@ -244,6 +244,14 @@ Begin
Result := False;
end;
procedure FreeThenNil(var AnObject: TObject);
begin
if AnObject<>nil then begin
AnObject.Free;
AnObject:=nil;
end;
end;
initialization
SendApplicationMessageFunction:=nil;
OwnerFormDesignerModifiedProc:=nil;