Memory leaks on Win32 and a Touch Screen device

  

I’m having memory leaks with every application running on a device with a Touch Screen capability.
If I use only the mouse and keyboard, everything is fine.
Memory leaks occur if I touch the application, it can be any gesture from tapping on a button to moving the form.

I’m using Delphi DX and I tested the issue on a Windows 10.

The application tested has nothing more than a TButton and a TEdit.

Here is the memory leaks report:

5 – 12 bytes: TDictionary<System.string,System.Generics.Collections.TList<FMX.Forms.TApplication.TFormRegistryItem>>.TKeyCollection x 1, TIdleMessage x 1, Unknown x 3
13 – 20 bytes: TApplication.TFormRegistryItem x 1, TApplicationFormFactor x 1, Unknown x 1
21 – 36 bytes: UnicodeString x 1
37 – 52 bytes: TList<FMX.Forms.TApplication.TFormRegistryItem> x 1, TDictionary<System.string,System.Generics.Collections.TList<FMX.Forms.TApplication.TFormRegistryItem>> x 1, TDictionary<FMX.Types.TWindowHandle,FMX.Platform.Win.TUpdateRects> x 1, TDictionary<FMX.Forms.TCommonCustomForm,FMX.Platform.Win.TFullScreenParams> x 1, TDictionary<System.Integer,System.NativeUInt> x 1, TDictionary<System.NativeUInt,FMX.Platform.Win.TWin32MenuInfo> x 1, TList<FMX.Platform.Win.TWin32TimerInfo> x 1, TList<System.Classes.TComponent> x 1
53 – 68 bytes: Unknown x 2
69 – 84 bytes: Unknown x 1
85 – 100 bytes: TMultiTouchManagerWin x 1
181 – 212 bytes: TPlatformWin x 1
213 – 244 bytes: TApplication x 1

Steps to reproduce:

Create a Multi-Device application.
Put a button on the form.
Run the application on a device with Touch Screen capability.
Click the button by tapping on the screen.
Close the application.

You should get a memory leak report.

The form code:

unit Unit1;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs;

type
TForm1 = class(TForm)
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.fmx}

end.

Comments are closed.