Browse Source

Added surface dispose to DrawingSurfaceDemoBase (#18412)

pull/18420/head
Krzysztof Krysiński 1 year ago
committed by GitHub
parent
commit
6a010a89f2
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      samples/GpuInterop/DrawingSurfaceDemoBase.cs

4
samples/GpuInterop/DrawingSurfaceDemoBase.cs

@ -33,7 +33,11 @@ public abstract class DrawingSurfaceDemoBase : Control, IGpuDemo
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
if (_initialized)
{
Surface?.Dispose();
FreeGraphicsResources();
}
_initialized = false;
base.OnDetachedFromLogicalTree(e);
}

Loading…
Cancel
Save