提交单例模式释放错误

This commit is contained in:
liyaobang committed 2025-03-24 18:26:01 +08:00
1 parent 33c2994455
commit cb7e216b3a
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ namespace DHSoftware
{ {
get get
{ {
if (_instance == null) if (_instance == null || _instance.IsDisposed)
_instance = new LoginWindow(); _instance = new LoginWindow();
return _instance; return _instance;
} }
+1 -1
View File
@@ -27,7 +27,7 @@ namespace DHSoftware.Views
{ {
get get
{ {
if (_instance == null) if (_instance == null || _instance.IsDisposed)
_instance = new SettingWindow(); _instance = new SettingWindow();
return _instance; return _instance;
} }