我想在delphi7中如何使用fastmm4

在 delphi 7 下使用  fastmm4 ,大致如下步骤:

一、准备工作

1、将文件 BorlndMM.dll,替换掉 Delphi/Bin 目录下的相应文件;

2、设置路径:Enviroment->Library->Directories-> Library Path 添加FassMM路径(在Delphi安装目录下建立FastMM文件夹,“C:\Program Files\Borland\Delphi7\FastMM”,将FastMM4.pas、FastMM4Messages.pas、FastMM4Options.inc三个文件拷贝其中,添加库路径"$(DELPHI)/FastMM;");

二、使用

在项目文件中(Project->View Source打开),uses 后第一行添加FastMM4单元;例如:FastMM4,Main   in   ‘Main.pas’   {MainForm},  

...... 

三、选项

FastMM4 有多种设置项,只需要修改 FastMM4Options.inc 文件即可,以下是常用的,更详细的请自行搜索:

我想在delphi7中如何使用fastmm4

(1) 打开全调试模式,例:{$define   FullDebugMode}

(2) 把FastMM_FullDebugMode.dll拷贝到编译后生成的可执行程序所在目录。

(3) 打开内存泄漏报告:EnableMemoryLeakReporting(一般情况下是缺省打开的)