How do I get access to FastMM4's RegisterExpectedMemoryLeak?

泪湿孤枕 提交于 2019-12-24 04:28:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!