Even if the application works fine for several days, there may still be memory leaks hidden in areas of the code that are not used (or not often). Thus, this can be a problem when this part of the application is activated after some time.
To ensure that all code is tested for leaks, you can use FastMM4 with unit tests (with DUnit ), ensuring that as many code paths as possible are executed. Unit test code coverage can be measured, for example, using the open source Delphi or Open , which has recently become open source .
In addition, DUnit in version trunk (9.4.0) supports automatic memory leak detection (based on FastMM4) for each test case.
source share