You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unoplatform/uno#1451
Yes I do have update. It seems that the issue is related to the way the GC is handling some of the Skia unmanaged references during the finalizers execution.
In your sample, you can do two things:
Either extract the SKPaint instances out of the OnPaintSurface, or make sure to dispose all the instances at the end of the scope. (the using var feature of C# 8.0 may be handy there). In your app, you should do the same for all disposable SkiaSharp types.
Avoid using Threading.Timer, and use DispatcherTimer. The former is using javascript directly and is somehow slower than the latter:
_t = new DispatcherTimer();
_t.Interval = TimeSpan.FromMilliseconds(200);
_t.Tick += delegate
{
Invalidate();
};
_t.Start();
There is definitely an underlying issue with the way the GC works, I'll a smaller repro and create a new one to track it.
The text was updated successfully, but these errors were encountered:
unoplatform/uno#1451
Yes I do have update. It seems that the issue is related to the way the GC is handling some of the Skia unmanaged references during the finalizers execution.
In your sample, you can do two things:
Either extract the SKPaint instances out of the OnPaintSurface, or make sure to dispose all the instances at the end of the scope. (the using var feature of C# 8.0 may be handy there). In your app, you should do the same for all disposable SkiaSharp types.
Avoid using Threading.Timer, and use DispatcherTimer. The former is using javascript directly and is somehow slower than the latter:
_t = new DispatcherTimer();
_t.Interval = TimeSpan.FromMilliseconds(200);
_t.Tick += delegate
{
Invalidate();
};
_t.Start();
There is definitely an underlying issue with the way the GC works, I'll a smaller repro and create a new one to track it.
The text was updated successfully, but these errors were encountered: