How can I enable the memory leak tracking with FastMM in DUnit?
Asked Answered
B

1

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

Balls answered 26/3, 2009 at 13:55 Comment(0)
B
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).

Barboza answered 26/3, 2009 at 14:17 Comment(2)
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 projectUnsnap
I found documentation on setting up DUnit with FastMM in DUnit's readme-fastmm.txtShantishantung

© 2022 - 2024 — McMap. All rights reserved.