浏览代码

GUI: deregister TUserInterface events

Herman Schoenfeld 7 年之前
父节点
当前提交
46f29992c1
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/gui/UUserInterface.pas

+ 7 - 1
src/gui/UUserInterface.pas

@@ -358,8 +358,14 @@ begin
   // Exit application
   // Exit application
   TLog.NewLog(ltinfo,Classname,'Quit Application - START');
   TLog.NewLog(ltinfo,Classname,'Quit Application - START');
   Try
   Try
-    step := 'Saving Settings';
+    step := 'Deregistering events';
     TSettings.OnChanged.Remove(OnSettingsChanged);
     TSettings.OnChanged.Remove(OnSettingsChanged);
+    FUIRefreshTimer.Remove(OnUITimerRefresh);
+    FReceivedHelloMessage.Remove(OnReceivedHelloMessage);
+    FLoaded.Remove(OnLoaded);
+    FUIRefreshTimer.Remove(OnUITimerRefresh);
+
+    step := 'Saving Settings';
     TSettings.Save;
     TSettings.Save;
 
 
     // Destroys root form, non-modal forms and all their attached components
     // Destroys root form, non-modal forms and all their attached components