From 91e1fe7e58aec7404a6029cb757dbe27677ebbb6 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Mon, 4 Mar 2019 21:53:18 +0300 Subject: [PATCH] show heap dump only when leaks are detected --- src/editor/Editor.lpr | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/editor/Editor.lpr b/src/editor/Editor.lpr index e5d6156..3889b51 100644 --- a/src/editor/Editor.lpr +++ b/src/editor/Editor.lpr @@ -78,6 +78,13 @@ begin Application.AddOnExceptionHandler(H.ExceptionHandler, True); Application.Initialize(); +{$IF DECLARED(UseHeapTrace)} + (* http://wiki.freepascal.org/heaptrc *) + GlobalSkipIfNoLeaks := True; + //SetHeapTraceOutput('EditorLeaks.log'); + //HaltOnError := False; +{$ENDIF} + Application.CreateForm(TMainForm, MainForm); Application.CreateForm(TOptionsForm, OptionsForm); Application.CreateForm(TAboutForm, AboutForm); -- 2.29.2