Memory leak?
Jonesie opened this issue · 2 comments
Can you post an example to repro this. There’s a bunch of use cases that might affect this (text block vs rich string etc) so need to know how you’re using it.
I think I resolved this.
Im using SkiaSharp and RichTextKit in an api to produce PDF, XPS and PNG files.
My custom FontMapper was being created many times so I added some request level caching based on a hash of the style so instead of having to create about 850 type faces, it now only creates 8 and they are correctly disposed when the request ends.
Im not sure if the default font mapper handles this, or how it could without knowing more about the use case but it might be useful to have a note in the documentation ... uneless there is already and I missed it.