提交单例模式释放错误

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

View File

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

View File

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