TrimCaches(Int64) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Drops the least recently used entries of the render caches until they hold at most maxBytes together: decoded content first (only builds read it), then images, glyph outlines and, last, display lists. Nothing is disposed; a dropped entry is rebuilt at its next use and renders the same.

public long TrimCaches(long maxBytes)

Parameters

maxBytes
Int64

The most bytes the caches may keep; zero empties them.

Returns

Int64
The bytes the caches hold afterwards.

Remarks

Spec #33 viewer capability 13: one memory budget covers a viewer's tiles, its display lists and the core caches, so the viewer trims the caches to what its tiles leave. Safe to call while other threads render.