13

In the GUI test runner, the menu items for memory leak checking are inactive (grayed out). Is there a special switch I have not found yet to activate them?

Using DUnit 9.4 (from Delphi 2009 or from the sourceforge Subversion repository) and FastMM4.92

mjn
  • 36,362
  • 28
  • 176
  • 378

1 Answers1

20

You have to build your DUnit GUI-testrunner with the FASTMM and ManualLeakReportingControl directive. This will enable the memoryleak items (Take a look in GUITestRunner.pas).

The_Fox
  • 6,992
  • 2
  • 43
  • 69
  • 6
    More details (because it took me a while to work it out): (1) FastMM4 must be the first unit in the "uses" section of your test project .dpr file. (2) Remove the "." in the line {.$define ManualLeakReportingControl} in FastMM4Options.inc (3) Add FASTMM to the test project Conditional defines (under "Directories/Conditionals" in the Project/Options... (4) Build the project – Neville Cook Jul 02 '14 at 09:36
  • I found documentation on setting up DUnit with FastMM in DUnit's [readme-fastmm.txt](https://sourceforge.net/p/dunit/svn/HEAD/tree/trunk/readme-fastmm.txt) – mcdon Jun 15 '16 at 18:23