From 1afe548ac40cc7f975917ef9bf2e156595cf81f3 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 16 四月 2026 08:58:04 +0800
Subject: [PATCH] 优化;
---
Plugin.TsSupport/TestAppManager.cs | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Plugin.TsSupport/TestAppManager.cs b/Plugin.TsSupport/TestAppManager.cs
index aff44ab..f136b8f 100644
--- a/Plugin.TsSupport/TestAppManager.cs
+++ b/Plugin.TsSupport/TestAppManager.cs
@@ -4,14 +4,18 @@
{
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;
}
}
}
--
Gitblit v1.9.1