开发者

Redirect results from ReportMemoryLeaksOnShutdown to a log file

I want to add memory leak detection to our automated Unit tests. ReportMemoryLeaksOnShutdown will detect any memory leaks. The big problem is that it prints the results to a modal dialog box, which has to be closed manually by the user. This does not work in an automated Unit test running on a build server.

Is there any way to redirect the output from ReportMemoryLeaksOnShutdown to somewhere else? For example, print the information to a开发者_开发知识库 file?

The doco says:

the Memory Manager will scan the memory pool when it shuts down and report all unregistered memory leaks in a message dialog.

I am using Delphi 2010


Download the full version of FastMM4 from sourceforge. You can configure it to write to a logfile in FastMM4Options.inc; just check the readme and FAQ files in the download for details. Specifically, look for information regarding FullDebugMode and LogErrorsToFile, and the third or fourth question in the FAQ readme.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜