我在具有触摸屏功能的设备上运行的每个应用程序都有内存泄漏 . 如果我只使用鼠标和键盘,一切都很好 . 如果我触摸应用程序会发生内存泄漏,它可以是通过点击按钮移动表单的任何手势 .
我正在使用Delphi DX,我在Windows 10上测试了这个问题 .
测试的应用程序只有TButton和TEdit .
这是内存泄漏报告:
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:
-
创建多设备应用程序 .
-
在表单上放置一个按钮 .
-
在具有触摸屏功能的设备上运行应用程序 .
-
点击屏幕点击按钮 .
-
关闭应用程序 .
你应该得到一个内存泄漏报告 .
表格代码:
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.