Jelajahi Sumber

// 内存回收 241220
finally
{
GC.Collect();
GC.WaitForPendingFinalizers();
}

姜永辉 1 tahun lalu
induk
melakukan
4038b2344b
2 mengubah file dengan 12 tambahan dan 0 penghapusan
  1. 6 0
      DK.Client/PCModule/F_PC_0101_1_1.cs
  2. 6 0
      DK.Client/PMModule/F_PM_0101.cs

+ 6 - 0
DK.Client/PCModule/F_PC_0101_1_1.cs

@@ -252,6 +252,12 @@ namespace Dongke.IBOSS.PRD.Client.PCModule
                 ExceptionManager.HandleEventException(this.ToString(),
                     System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
             }
+            // 内存回收 241220
+            finally
+            {
+                GC.Collect();
+                GC.WaitForPendingFinalizers();
+            }
         }
 
         /// <summary>

+ 6 - 0
DK.Client/PMModule/F_PM_0101.cs

@@ -132,6 +132,12 @@ namespace Dongke.IBOSS.PRD.Client.PMModule
                 ExceptionManager.HandleEventException(this.ToString(),
                     MethodBase.GetCurrentMethod().Name, this.Text, ex);
             }
+            // 内存回收 241220
+            finally
+            {
+                GC.Collect();
+                GC.WaitForPendingFinalizers();
+            }
         }
 
         /// <summary>