From 2e889843b4c171f2d6ad8e0d53084040703d11f6 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 13:18:21 +0800
Subject: [PATCH] docs: CAN 总线级应答器 + 硬件调试页多标签多会话 设计规格

---
 Plugin.TsSupport/TestAppManager.cs |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/Plugin.TsSupport/TestAppManager.cs b/Plugin.TsSupport/TestAppManager.cs
index aff44ab..ecc405c 100644
--- a/Plugin.TsSupport/TestAppManager.cs
+++ b/Plugin.TsSupport/TestAppManager.cs
@@ -4,14 +4,30 @@
 {
     public class TestAppManager
     {
+        private static object lockObj = new object();
         private static AxApplicationMgr instance;
         public static AxApplicationMgr GetAxApplicationMgr()
         {
-            if (instance == null)
+            lock (lockObj)
             {
-                instance = new AxApplicationMgr();
+                if (instance == null)
+                {
+                    instance = new AxApplicationMgr();
+                }
+                return instance;
             }
-            return instance;
+        }
+
+        public static void Dispose()
+        {
+            lock (lockObj)
+            {
+                if (instance != null)
+                {
+                    instance.Dispose();
+                    instance = null;
+                }
+            }
         }
     }
 }

--
Gitblit v1.9.1