From 90085657b47b72c084b8e08eb53db52c961e5ce9 Mon Sep 17 00:00:00 2001 From: miclat97 <40289683+miclat97@users.noreply.github.com> Date: Sun, 21 Jun 2026 23:30:02 +0000 Subject: [PATCH] Clean up IDisposable boilerplate in VideoPlayerControl Removed unused boilerplate comments regarding unmanaged resources and large fields in `Dispose(bool disposing)`. Also removed the commented-out finalizer as the class only uses managed WPF controls and does not require custom unmanaged cleanup. 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