释放模型

This commit is contained in:
xhm\HP 2025-03-27 18:03:07 +08:00
parent 0865af247a
commit b19feb5a44
2 changed files with 15 additions and 2 deletions

View File

@ -36,7 +36,20 @@ namespace DH.Devices.Vision
// ImageSaveHelper.OnImageSaveExceptionRaised += ImageSaveHelper_OnImageSaveExceptionRaised;
// base.Init();
}
public void Stop()
{
SimboStationMLEngineList.ToList().ForEach(sm =>
{
if (sm.IsUseGPU)
{
sm.StationMLEngine.Dispose();
}
else
{
sm.StationMLEngine.Dispose2();
}
});
}
//private void ImageSaveHelper_OnImageSaveExceptionRaised(DateTime dt, string msg)
//{
// LogAsync(new LogMsg(dt, LogLevel.Error, msg));

View File

@ -517,7 +517,7 @@ namespace DHSoftware
{
PLC.CloseProcess();
}
_visionEngine.Stop();//释放模型
CloseWindow.Instance.Close();// 关闭提示窗口
//Application.Exit();
System.Environment.Exit(0);