cleaned-up dispose TODO (#22703)

This commit is contained in:
Davide Giacometti 2022-12-10 17:20:10 +01:00 committed by GitHub
parent 6b199a1154
commit cd1b7dbc2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 0 additions and 52 deletions

View File

@ -66,8 +66,6 @@ namespace Microsoft.Interop.Tests
ClientPipe.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -151,12 +151,9 @@ public class KeyboardMonitor : IDisposable
{
if (disposing)
{
// TODO: dispose managed state (managed objects)
_keyboardHook?.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -89,8 +89,6 @@ namespace ColorPickerUI
_themeManager?.Dispose();
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -162,12 +162,9 @@ namespace ColorPicker.Keyboard
{
if (disposing)
{
// TODO: dispose managed state (managed objects)
_keyboardHook?.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -209,8 +209,6 @@ namespace FancyZonesEditor
_themeManager?.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
_isDisposed = true;
Logger.LogInfo("FancyZones Editor disposed");
}

View File

@ -550,8 +550,6 @@ namespace ImageResizer.Models
_directory.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -64,8 +64,6 @@ namespace ImageResizer
}
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -67,8 +67,6 @@ namespace ImageResizer
_themeManager?.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
_isDisposed = true;
}
}

View File

@ -100,8 +100,6 @@ namespace ImageResizer.ViewModels
_cancellationTokenSource.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -293,18 +293,10 @@ namespace PowerLauncher
_themeManager?.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
Log.Info("End PowerToys Run Exit ---------------------------------------------------- ", GetType());
});
}
// // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources
// ~App()
// {
// // 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

View File

@ -4,7 +4,6 @@
using System;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
@ -733,19 +732,11 @@ namespace PowerLauncher
_hwndSource?.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
_firstDeleteTimer = null;
_disposedValue = true;
}
}
// // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources
// ~MainWindow()
// {
// // 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

View File

@ -56,8 +56,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode
_gcodePreviewControl.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -56,8 +56,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
_markdownPreviewHandlerControl.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -55,8 +55,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
_monacoPreviewHandlerControl.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
_disposedValue = true;
this.Unload();
}

View File

@ -56,8 +56,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Pdf
_pdfPreviewHandlerControl.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
_disposedValue = true;
}
}

View File

@ -56,8 +56,6 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg
_svgPreviewControl.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -45,8 +45,6 @@ namespace Common
_previewHandlerControl.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}

View File

@ -373,12 +373,9 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
{
if (disposing)
{
// TODO: dispose managed state (managed objects)
hook.Dispose();
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}