Browse Source

修复图片被提前释放问题

KWD 6 months ago
parent
commit
17517a265b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      TeamAAS-VM/Views/Home/ShowVisionRender.xaml.cs

+ 3 - 3
TeamAAS-VM/Views/Home/ShowVisionRender.xaml.cs

@@ -330,18 +330,18 @@ namespace TeamAAS_VP.Views.Home
                         finally
                         {
                             // 确保释放 Clone 的 Bitmap,避免 GDI 泄漏导致闪退
-                            try { clonedBitmap?.Dispose(); } catch { }
+                            //try { clonedBitmap?.Dispose(); } catch { }
                             _saveSemaphore.Release();
                         }
                     }, token);
                 }
                 catch (OperationCanceledException)
                 {
-                    try { clonedBitmap?.Dispose(); } catch { }
+                    //try { clonedBitmap?.Dispose(); } catch { }
                 }
                 catch (Exception ex)
                 {
-                    try { clonedBitmap?.Dispose(); } catch { }
+                    //try { clonedBitmap?.Dispose(); } catch { }
                     LogHelper.WriteLogError("RequestSaveImage(UI截图阶段) 出错!", ex);
                 }
             }));