你没有正确配置FastMM4Options.inc
。从随版本 4.97 分发的文件中,它在第 405 行附近:
{Set this option to require the presence of the Delphi IDE to report memory
leaks. This option has no effect if the option "EnableMemoryLeakReporting"
is not also set.}
{.$define RequireIDEPresenceForLeakReporting}
确保.
位于最后一行(在 之前$define
)并重建您的项目。
@wades 发现还有另一个设置,就在我提到的那个下面RequireDebuggerPresenceForLeakReporting
,默认为开启。通过在左大括号后添加一个句点来禁用它:
{Set this option to require the program to be run inside the IDE debugger to
report memory leaks. This option has no effect if the option
"EnableMemoryLeakReporting" is not also set.}
{$define RequireDebuggerPresenceForLeakReporting}
(根据@wades 的要求添加到这个答案中。)