From db6aa6a6f82dcbbf43adb0b9c1c770608d049db1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 11:38:25 +0000 Subject: [PATCH 1/2] Initial plan From 546b9dc826022a62e940080b34db93c5b96b4324 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 11:40:09 +0000 Subject: [PATCH 2/2] Clarify pragma warning comment in MagicEraser The comment now correctly explains that outputBitmap's ownership is transferred to become the new _inputBitmap value, not to the old _inputBitmap. Co-authored-by: weiyuanyue <176483933+weiyuanyue@users.noreply.github.com> --- AIDevGallery/Samples/WCRAPIs/MagicEraser.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AIDevGallery/Samples/WCRAPIs/MagicEraser.xaml.cs b/AIDevGallery/Samples/WCRAPIs/MagicEraser.xaml.cs index d563d9e6..9fa15231 100644 --- a/AIDevGallery/Samples/WCRAPIs/MagicEraser.xaml.cs +++ b/AIDevGallery/Samples/WCRAPIs/MagicEraser.xaml.cs @@ -190,7 +190,7 @@ private async void EraseObject_Click(object sender, RoutedEventArgs e) try { - // Ownership of outputBitmap is transferred to _inputBitmap, so it should not be disposed here + // outputBitmap's ownership is transferred to become the new _inputBitmap, so it should not be disposed here #pragma warning disable IDISP001 // Dispose created var outputBitmap = _eraser.RemoveFromSoftwareBitmap(_inputBitmap, _maskBitmap); #pragma warning restore IDISP001