Browse Source

Fixed RTB Dispose

pull/11235/head
Nikita Tsukanov 3 years ago
parent
commit
9ab08885ed
  1. 8
      src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs

8
src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs

@ -9,7 +9,7 @@ namespace Avalonia.Media.Imaging
/// <summary>
/// A bitmap that holds the rendering of a <see cref="Visual"/>.
/// </summary>
public class RenderTargetBitmap : Bitmap, IDisposable
public class RenderTargetBitmap : Bitmap
{
/// <summary>
/// Initializes a new instance of the <see cref="RenderTargetBitmap"/> class.
@ -68,5 +68,11 @@ namespace Avalonia.Media.Imaging
platform.Clear(Colors.Transparent);
return new PlatformDrawingContext(platform);
}
public override void Dispose()
{
PlatformImpl.Dispose();
base.Dispose();
}
}
}

Loading…
Cancel
Save