mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 12:59:16 +02:00
LazReport, fix mem leaks
git-svn-id: trunk@46164 -
This commit is contained in:
parent
9616a4ffe4
commit
51415f926a
@ -428,6 +428,34 @@ begin
|
|||||||
DoRegsiterControl(lrBMP_LRRadioGroupBox, TlrRadioGroup);
|
DoRegsiterControl(lrBMP_LRRadioGroupBox, TlrRadioGroup);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure DoneLRComp;
|
||||||
|
begin
|
||||||
|
if Assigned(lrBMP_LRLabel) then
|
||||||
|
FreeAndNil(lrBMP_LRLabel);
|
||||||
|
if Assigned(lrBMP_LREdit) then
|
||||||
|
FreeAndNil(lrBMP_LREdit);
|
||||||
|
if Assigned(lrBMP_LRButton) then
|
||||||
|
FreeAndNil(lrBMP_LRButton);
|
||||||
|
if Assigned(lrBMP_LRCheckBox) then
|
||||||
|
FreeAndNil(lrBMP_LRCheckBox);
|
||||||
|
if Assigned(lrBMP_LRComboBox) then
|
||||||
|
FreeAndNil(lrBMP_LRComboBox);
|
||||||
|
if Assigned(lrBMP_LRRadioButton) then
|
||||||
|
FreeAndNil(lrBMP_LRRadioButton);
|
||||||
|
if Assigned(lrBMP_LRMemo) then
|
||||||
|
FreeAndNil(lrBMP_LRMemo);
|
||||||
|
if Assigned(lrBMP_LRListBox) then
|
||||||
|
FreeAndNil(lrBMP_LRListBox);
|
||||||
|
if Assigned(lrBMP_LRDateEdit) then
|
||||||
|
FreeAndNil(lrBMP_LRDateEdit);
|
||||||
|
if Assigned(lrBMP_LRButtonPanel) then
|
||||||
|
FreeAndNil(lrBMP_LRButtonPanel);
|
||||||
|
if Assigned(lrBMP_LRCheckListBox) then
|
||||||
|
FreeAndNil(lrBMP_LRCheckListBox);
|
||||||
|
if Assigned(lrBMP_LRRadioGroupBox) then
|
||||||
|
FreeAndNil(lrBMP_LRRadioGroupBox);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TlrRadioGroup }
|
{ TlrRadioGroup }
|
||||||
|
|
||||||
function TlrRadioGroup.GetItemIndex: integer;
|
function TlrRadioGroup.GetItemIndex: integer;
|
||||||
@ -1520,28 +1548,7 @@ initialization
|
|||||||
InitLRComp;
|
InitLRComp;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
if Assigned(lrBMP_LRLabel) then
|
DoneLRComp;
|
||||||
FreeAndNil(lrBMP_LRLabel);
|
|
||||||
if Assigned(lrBMP_LREdit) then
|
|
||||||
FreeAndNil(lrBMP_LREdit);
|
|
||||||
if Assigned(lrBMP_LRButton) then
|
|
||||||
FreeAndNil(lrBMP_LRButton);
|
|
||||||
if Assigned(lrBMP_LRCheckBox) then
|
|
||||||
FreeAndNil(lrBMP_LRCheckBox);
|
|
||||||
if Assigned(lrBMP_LRComboBox) then
|
|
||||||
FreeAndNil(lrBMP_LRComboBox);
|
|
||||||
if Assigned(lrBMP_LRRadioButton) then
|
|
||||||
FreeAndNil(lrBMP_LRRadioButton);
|
|
||||||
if Assigned(lrBMP_LRMemo) then
|
|
||||||
FreeAndNil(lrBMP_LRMemo);
|
|
||||||
if Assigned(lrBMP_LRListBox) then
|
|
||||||
FreeAndNil(lrBMP_LRListBox);
|
|
||||||
if Assigned(lrBMP_LRDateEdit) then
|
|
||||||
FreeAndNil(lrBMP_LRDateEdit);
|
|
||||||
if Assigned(lrBMP_LRButtonPanel) then
|
|
||||||
FreeAndNil(lrBMP_LRButtonPanel);
|
|
||||||
if Assigned(lrBMP_LRRadioGroupBox) then
|
|
||||||
FreeAndNil(lrBMP_LRRadioGroupBox);
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
@ -7772,6 +7772,7 @@ type
|
|||||||
procedure InsertDbFields;
|
procedure InsertDbFields;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -8047,6 +8048,12 @@ begin
|
|||||||
frRegisterTool(sInsertFields, lrBMPInsFields, @InsFieldsClick);
|
frRegisterTool(sInsertFields, lrBMPInsFields, @InsFieldsClick);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor TlrInternalTools.Destroy;
|
||||||
|
begin
|
||||||
|
lrBMPInsFields.Free;
|
||||||
|
inherited destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
frDesigner:=nil;
|
frDesigner:=nil;
|
||||||
ProcedureInitDesigner:=@InitGlobalDesigner;
|
ProcedureInitDesigner:=@InitGlobalDesigner;
|
||||||
|
Loading…
Reference in New Issue
Block a user