问题
I'm using Delphi's fastMM memory manager and I fail when I try to use the full debug mode.
I get the following errors when compiling:
FastMM\FastMM4.pas(6872) Error: Undeclared identifier: 'RegisterExpectedMemoryLeak'
FastMM\FastMM4.pas(6948) Error: Undeclared identifier: 'UnregisterExpectedMemoryLeak'
FastMM\FastMM4.pas(9269)
import_test.dpr(24) Fatal: Could not compile used unit 'FastMM\FastMM4.pas'
The .inc file tells to load the full debug dll. I've already copied the FastMM_FullDebugMode.dll file everywhere. It looks like I should have included something in my project.
I'm probably missing something really obvious.
The Delphi version is 7.
回答1:
Turn on the EnableMemoryLeakReporting
directive in the include file FastMM4Options.inc
by changing it from:
{.$define EnableMemoryLeakReporting}
to:
{$define EnableMemoryLeakReporting}
Also read the comments in that file and understand the various options, turn them on/off as needed.
来源:https://stackoverflow.com/questions/7955169/how-do-i-get-access-to-fastmm4s-registerexpectedmemoryleak