mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
[Peek]Fix memory leak caused by unmanaged bitmaps not being freed (#34484)
This commit is contained in:
@@ -154,6 +154,9 @@ namespace Peek.FilePreviewer
|
||||
_cancellationTokenSource.Cancel();
|
||||
_cancellationTokenSource = new();
|
||||
|
||||
// Clear up any unmanaged resources before creating a new previewer instance.
|
||||
(Previewer as IDisposable)?.Dispose();
|
||||
|
||||
if (Item == null)
|
||||
{
|
||||
Previewer = null;
|
||||
|
||||
@@ -103,12 +103,6 @@
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Update="Controls\UnsupportedFilePreview\FailedFallbackPreviewControl.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Update="FilePreview.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
Reference in New Issue
Block a user