Skip to content
Discussion options

You must be logged in to vote

GC pressure generally applies to managed allocations. It doesn't know about unmanaged memory unless you tell it with GC.AddMemoryPressure, and SkiaSharp doesn't call that. It would be hard to even estimate a value for a lot of objects, and even if you did, the memory might also reside largely on the GPU. So, you might well run out of resources before the GC even thinks to kick in. Basically, in general, if you're not deterministically disposing stuff with SkiaSharp then you're going to have a bad time.

Here, what you might want to do is to restructure the rendering to apply the transform to the canvas rather than the shader -SKAutoCanvasRestore might help you out.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RedEye-Developers
Comment options

Answer selected by RedEye-Developers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants