mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 10:47:58 +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);
|
||||
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 }
|
||||
|
||||
function TlrRadioGroup.GetItemIndex: integer;
|
||||
@ -1520,28 +1548,7 @@ initialization
|
||||
InitLRComp;
|
||||
|
||||
finalization
|
||||
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_LRRadioGroupBox) then
|
||||
FreeAndNil(lrBMP_LRRadioGroupBox);
|
||||
DoneLRComp;
|
||||
end.
|
||||
|
||||
|
||||
|
@ -7772,6 +7772,7 @@ type
|
||||
procedure InsertDbFields;
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -8047,6 +8048,12 @@ begin
|
||||
frRegisterTool(sInsertFields, lrBMPInsFields, @InsFieldsClick);
|
||||
end;
|
||||
|
||||
destructor TlrInternalTools.Destroy;
|
||||
begin
|
||||
lrBMPInsFields.Free;
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
initialization
|
||||
frDesigner:=nil;
|
||||
ProcedureInitDesigner:=@InitGlobalDesigner;
|
||||
|
Loading…
Reference in New Issue
Block a user