如何在Delphi XE下打开/关闭FastMM内存泄漏报告? [英] How do I turn on/off FastMM memory leak reporting under Delphi XE?

查看:1057
本文介绍了如何在Delphi XE下打开/关闭FastMM内存泄漏报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Delphi XE下打开/关闭FastMM内存泄漏报告?
在Delphi 7下,我不得不修改inc文件。但是我听说Delphi XE已经集成了FastMM。如何访问FastMM设置?

How do I turn on/off FastMM memory leak reporting under Delphi XE? Under Delphi 7, I had to modify the inc file. But I hear that Delphi XE has FastMM already integrated. How do I access FastMM settings?

我从Delphi帮助中获得了这一点:

I got this from Delphi Help:

内存管理器(FastMM)的完整源代码在SourceForge上可用。

使用完整版本的FastMM,您可以以特殊的调试模式运行内存管理器,这是有用的用于检测堆损坏和内存泄漏。 FastMM的完整版本中的其他功能:

双重空闲对象/接口

文件记录和报告

Full source code for the Memory Manager (FastMM) is available on SourceForge.
With the full version of FastMM, you can run the memory manager in a special "debug" mode which is useful for detecting heap corruption and memory leaks. Additional features in the full version of FastMM:
Double free objects / interfaces
File logging and reports

有关更多信息请参阅FastMM源代码中的注释(FastMM4.pas和FastMM4Options.inc)。

For more information, please see the comments in the FastMM source code(FastMM4.pas and FastMM4Options.inc).

所以看起来我还需要手动安装FastMM。但是我必须在项目的USES子句中包含FastMM4?

So it looks like I still have to install FastMM manually. But do i have to include 'FastMM4' in project's USES clause?

推荐答案

通过分配给布尔变量 System.ReportMemoryLeaksOnShutdown

这将允许您控制唯一最重要的设置,报告内存泄漏。如果您想要更精细地控制FastMM设置,那么就像您在Delphi 7中一样,将FastMM包含在您的项目中。

This will allow you to control the single most important setting, the reporting of memory leaks. If you want more fine grained control of the FastMM settings then include FastMM in your project just as you did in Delphi 7.

这篇关于如何在Delphi XE下打开/关闭FastMM内存泄漏报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆