Method ClearFontCache
- Namespace
- DocWright
- Assembly
- DocWright.dll
ClearFontCache()
Releases every cached font engine this converter holds.
public void ClearFontCache()
Remarks
Building a font engine means indexing every face in the configured directories, which costs about a second and is why the result is cached at all. A long-lived converter that serves one font configuration should never need this.
It exists for the host that varies fonts per tenant or per request, and for the one that wants the memory back after a batch: an engine holds parsed font tables, so the cache is measured in megabytes rather than kilobytes. Safe to call while conversions are running — an engine already handed to a conversion in flight stays alive until that conversion finishes with it.