Browse Source

Dispose of the PathCache.

pull/12724/head
Steven Kirk 3 years ago
parent
commit
2ec917d665
  1. 4
      src/Skia/Avalonia.Skia/GeometryImpl.cs

4
src/Skia/Avalonia.Skia/GeometryImpl.cs

@ -78,7 +78,7 @@ namespace Avalonia.Skia
public IGeometryImpl GetWidenedGeometry(IPen pen)
{
var cache = new PathCache();
using var cache = new PathCache();
cache.UpdateIfNeeded(StrokePath, pen);
if (cache.ExpandedPath is { } path)
@ -160,7 +160,7 @@ namespace Avalonia.Skia
_pathCache = default;
}
private struct PathCache
private struct PathCache : IDisposable
{
private double _width, _miterLimit;
private PenLineCap _cap;

Loading…
Cancel
Save