From 0ac02d620d8cbfe3ae200d40ebd5799c2105c8d7 Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Thu, 29 Feb 2024 08:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=B8=85=E9=99=A4=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=97=B6=E5=90=8C=E6=97=B6=E8=B0=83=E7=94=A8GC=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC=E5=8F=B7=EF=BC=9A2.20.24.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.Framework/ImageProcess.cs | 31 ++++++++++++++----------- Rs.Framework/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Rs.Framework/ImageProcess.cs b/Rs.Framework/ImageProcess.cs index 5ef72f7..1883e71 100644 --- a/Rs.Framework/ImageProcess.cs +++ b/Rs.Framework/ImageProcess.cs @@ -10,7 +10,7 @@ namespace Rs.Framework { public static class ImageProcess { - static UInt64 imageNum = 0; + //static UInt64 imageNum = 0; public static ManualResetEvent manualTriggerEvent = new ManualResetEvent(false); public static ManualResetEvent autoTriggerEvent = new ManualResetEvent(false); @@ -19,12 +19,12 @@ namespace Rs.Framework public static void AddManualTrigger(HObject obj) { - imageNum++; - if (imageNum>20) - { - GC.Collect(); - imageNum = 0; - } + //imageNum++; + //if (imageNum>20) + //{ + // GC.Collect(); + // imageNum = 0; + //} manualTriggerList.Add(obj); manualTriggerEvent.Set(); } @@ -33,6 +33,7 @@ namespace Rs.Framework { manualTriggerList.Clear(); manualTriggerEvent.Reset(); + GC.Collect(); } public static HObject GetManualImage() @@ -51,21 +52,23 @@ namespace Rs.Framework public static void AddAutoTrigger(HObject obj) { - imageNum++; - if (imageNum > 20) - { - LogHelper.Debug($"imagenum={imageNum},释放内存"); - GC.Collect(); - imageNum = 0; - } + //imageNum++; + //if (imageNum > 20) + //{ + // LogHelper.Debug($"imagenum={imageNum},释放内存"); + // GC.Collect(); + // imageNum = 0; + //} autoTriggerList.Add(obj); autoTriggerEvent.Set(); + } public static void ClearAutoTrigger() { autoTriggerList.Clear(); autoTriggerEvent.Reset(); + GC.Collect(); } } } diff --git a/Rs.Framework/Properties/AssemblyInfo.cs b/Rs.Framework/Properties/AssemblyInfo.cs index 19b8c63..e7cc859 100644 --- a/Rs.Framework/Properties/AssemblyInfo.cs +++ b/Rs.Framework/Properties/AssemblyInfo.cs @@ -33,5 +33,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("2.20.24.1")] //[assembly: AssemblyFileVersion("1.0.0.0")]