DIspose添加
This commit is contained in:
@@ -84,7 +84,19 @@ namespace SettingModule.ViewModels
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_scope?.Dispose();
|
||||
try
|
||||
{
|
||||
if (DeviceList != null)
|
||||
{
|
||||
DeviceList = null!;
|
||||
}
|
||||
SelectedDevice = null;
|
||||
_scopedContext = null!;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LoggerHelper.ErrorWithNotify($"释放配置管理组件(SettingViewModel)资源失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
#region 命令
|
||||
@@ -191,5 +203,6 @@ namespace SettingModule.ViewModels
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user