I changed the "CheckBlocksOnShutdown procedure (ACheckForLeakedBlocks: Boolean);" set an exit code for my current client, so I could easily check for DUnit if the spawned process had a memory leak. I added a line at the end of the procedure:
...
{$ifdef UseOutputDebugString}
OutputDebugStringA(LLeakMessage);
{$endif}
ExitCode := 1; <-- added this one
if Assigned(OnMessage) then
OnMessage(LLeakMessage);
...
source
share