Browse Source

Merge pull request #7887 from ltetak/feature/skia_crash_on_exit

Suppress static SKFont finalizer to prevent crashes on app exit
pull/7888/head
Benedikt Stebner 4 years ago
committed by GitHub
parent
commit
6507c4eff1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

3
src/Skia/Avalonia.Skia/PlatformRenderInterface.cs

@ -35,6 +35,9 @@ namespace Avalonia.Skia
var gl = AvaloniaLocator.Current.GetService<IPlatformOpenGlInterface>();
if (gl != null)
_skiaGpu = new GlSkiaGpu(gl, maxResourceBytes);
//TODO: SKFont crashes when disposed in finalizer so we keep it alive
GC.SuppressFinalize(s_font);
}
public IGeometryImpl CreateEllipseGeometry(Rect rect) => new EllipseGeometryImpl(rect);

Loading…
Cancel
Save