program Project1;
uses
FastMM4,
Vcl.Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
// Ustaw opcje FastMM4, aby włączyć raport o wyciekach
FastMM4.SetOptions(FastMM4.GetOptions + [foShowMemoryLeakReport]);
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
我尝试在我的应用程序中显示泄漏,但没有返回任何消息。
[dcc32 Error] Project1.dpr(12): E2003 Undeclared identifier: 'SetOptions'
[dcc32 Error] Project1.dpr(12): E2003 Undeclared identifier: 'GetOptions'
[dcc32 Error] Project1.dpr(12): E2003 Undeclared identifier: 'foShowMemoryLeakReport'
System.ReportMemoryLeaksOnShutdown
来代替。
program Project1;
uses
Vcl.Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
ReportMemoryLeaksOnShutdown := True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.