To fix a memory leak in TMSFMXPrintPreview, I made the 2 following changes. Occurs if you just preview and cancel the dialog.
1)
procedure TTMSFMXPrintPreviewDialogForm.Init;
if Assigned(bmp) then // Added code
bmp.Free;
bmp := TBitmap.Create(Printer.PageWidth, Printer.PageHeight);
2)
procedure TTMSFMXPrintPreviewDialogForm.FormDestroy(Sender: TObject);
begin
if Assigned(bmp) then
FreeAndNil(bmp);
end;
We have applied this, the next version will address this.
Kind Regards,
Pieter