Are you on Windows? In trunk, there is a “Cancel” button that skips the remaining messageboxes (and a default limit of 1024 reported leaks, which can still lead to 1024+ messageboxes, though).
Or fix the leaks already XD.
Or use {$apptype console}.
Or call SetHeapTraceOutput('heap.log'), and then periodically remove heap.log because new logs are appended to it, not overwrite it.
(SetHeapTraceOutput('nul') is possible but not much better than just disabling heaptrc.)