mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 12:29:32 +02:00
* Parent must free children (bug ID 33357)
git-svn-id: trunk@38458 -
This commit is contained in:
parent
68be282507
commit
98b48ccded
@ -2878,7 +2878,6 @@ begin
|
||||
FExpression:=aExpr;
|
||||
DataType:=aType;
|
||||
ResetType:=aResetType;
|
||||
|
||||
ResetValueExpression:=aResetValueExpression;
|
||||
end;
|
||||
end;
|
||||
@ -6780,15 +6779,18 @@ begin
|
||||
end;
|
||||
|
||||
destructor TFPReportElementWithChildren.Destroy;
|
||||
//var
|
||||
// i: integer;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
if Assigned(FChildren) then
|
||||
begin
|
||||
// for i := 0 to FChildren.Count - 1 do
|
||||
// Child[i].FParent := nil;
|
||||
begin
|
||||
for i := 0 to FChildren.Count - 1 do
|
||||
begin
|
||||
Child[i].FParent := nil;
|
||||
Child[i].Free;
|
||||
end;
|
||||
FreeAndNil(FChildren);
|
||||
end;
|
||||
end;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -7383,6 +7385,7 @@ procedure TFPCustomReport.EmptyRTObjects;
|
||||
begin
|
||||
while RTObjects.Count > 0 do
|
||||
begin
|
||||
|
||||
TFPReportElement(RTObjects[0]).Free;
|
||||
RTObjects.Delete(0);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user