DEADSOFTWARE

show heap dump only when leaks are detected
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 4 Mar 2019 18:53:18 +0000 (21:53 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 4 Mar 2019 18:53:18 +0000 (21:53 +0300)
src/editor/Editor.lpr

index e5d615625dc332d9094a59823bba66049db33924..3889b5109fd514598830302435c888ccfe509be8 100644 (file)
@@ -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);