From f40ddeca6a5b81ea4ba333d28fb6ea9bd7244add Mon Sep 17 00:00:00 2001 From: miclat97 <40289683+miclat97@users.noreply.github.com> Date: Sun, 21 Jun 2026 23:31:44 +0000 Subject: [PATCH] Refactor: Remove commented finalizer from VideoPlayerControl - Remove commented-out `~videoInWindowPlayerControl` finalizer code. - Remove related `TODO` comments inside the `Dispose(bool disposing)` method. - Confirmed no unmanaged resources are being explicitly held by the user control. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- QuickViewFile/Controls/VideoPlayerControl.xaml.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/QuickViewFile/Controls/VideoPlayerControl.xaml.cs b/QuickViewFile/Controls/VideoPlayerControl.xaml.cs index c276249..cb9407c 100644 --- a/QuickViewFile/Controls/VideoPlayerControl.xaml.cs +++ b/QuickViewFile/Controls/VideoPlayerControl.xaml.cs @@ -263,8 +263,6 @@ protected virtual void Dispose(bool disposing) videoInWindowPlayer.Close(); } - // TODO: free unmanaged resources (unmanaged objects) and override finalizer - // TODO: set large fields to null disposedValue = true; } } @@ -300,13 +298,6 @@ public TimeSpan GetCurrentVideoPosition() return TimeSpan.FromSeconds(sliProgress.Value); } - // // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources - // ~videoInWindowPlayerControl() - // { - // // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method - // Dispose(disposing: false); - // } - public void Dispose() { // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method