* Fix bug #33399, RemovePage does not free page

git-svn-id: trunk@38468 -
This commit is contained in:
michael 2018-03-09 12:14:52 +00:00
parent fbd974b0d8
commit ad409edb30

View File

@ -7813,6 +7813,9 @@ end;
procedure TFPCustomReport.Clear;
Var
P : TFPReportCustomPage;
begin
// Variables
FRTCurPageIdx := -1;
@ -7825,7 +7828,11 @@ begin
if Assigned(FPages) then
begin
While PageCount>0 do
RemovePage(Pages[FPages.Count-1]);
begin
P:=Pages[PageCount-1];
RemovePage(P);
FreeAndNil(P);
end;
FPages.Clear;
end;
ClearReferenceList;