mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 22:59:07 +02:00
MG: fixed memleaks
git-svn-id: trunk@2424 -
This commit is contained in:
parent
115a37923c
commit
45c40ec1f9
@ -54,7 +54,7 @@ var
|
|||||||
function SendApplicationMessage(Msg: Cardinal; WParam, LParam: Longint):Longint;
|
function SendApplicationMessage(Msg: Cardinal; WParam, LParam: Longint):Longint;
|
||||||
procedure OwnerFormDesignerModified(AComponent: TComponent);
|
procedure OwnerFormDesignerModified(AComponent: TComponent);
|
||||||
function OffSetRect(var ARect: TRect; dx,dy: Integer): Boolean;
|
function OffSetRect(var ARect: TRect; dx,dy: Integer): Boolean;
|
||||||
|
procedure FreeThenNil(var AnObject: TObject);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -244,6 +244,14 @@ Begin
|
|||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure FreeThenNil(var AnObject: TObject);
|
||||||
|
begin
|
||||||
|
if AnObject<>nil then begin
|
||||||
|
AnObject.Free;
|
||||||
|
AnObject:=nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
SendApplicationMessageFunction:=nil;
|
SendApplicationMessageFunction:=nil;
|
||||||
OwnerFormDesignerModifiedProc:=nil;
|
OwnerFormDesignerModifiedProc:=nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user