From: DeaDDooMER Date: Mon, 4 Mar 2019 18:53:18 +0000 (+0300) Subject: show heap dump only when leaks are detected X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=91e1fe7e58aec7404a6029cb757dbe27677ebbb6;p=d2df-editor.git show heap dump only when leaks are detected --- 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);