Browse Source
Propagate Dispose from GlyphTypefaceImpl to dispose SkTypeface (#15733)
pull/15810/head
lindexi
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
1 deletions
-
src/Skia/Avalonia.Skia/FontManagerImpl.cs
-
src/Skia/Avalonia.Skia/GlyphTypefaceImpl.cs
|
|
|
@ -59,7 +59,7 @@ namespace Avalonia.Skia |
|
|
|
t_languageTagBuffer[0] = culture.TwoLetterISOLanguageName; |
|
|
|
t_languageTagBuffer[1] = culture.ThreeLetterISOLanguageName; |
|
|
|
|
|
|
|
var skTypeface = _skFontManager.MatchCharacter(null, skFontStyle, t_languageTagBuffer, codepoint); |
|
|
|
using var skTypeface = _skFontManager.MatchCharacter(null, skFontStyle, t_languageTagBuffer, codepoint); |
|
|
|
|
|
|
|
if (skTypeface != null) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -188,6 +188,7 @@ namespace Avalonia.Skia |
|
|
|
|
|
|
|
Font.Dispose(); |
|
|
|
Face.Dispose(); |
|
|
|
_typeface.Dispose(); |
|
|
|
} |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|