SetDisplayListCacheLimit

Page manipulation

Description

Caps the display-list cache by entry count and retained bytes

Syntax

Delphi

Function SetDisplayListCacheLimit(MaxEntries: Integer): Integer; Overload;
Function SetDisplayListCacheLimit(MaxEntries: Integer; MaxBytes: Int64): Integer; Overload;

Parameters

MaxEntriesMaximum number of cached display lists; 0 disables the entry-count limit
MaxBytesMaximum estimated bytes retained by display-list records, operand arrays and string payloads; 0 disables the byte limit

Return value

1 on success, 0 when either limit is negative

Remarks

The one-parameter overload changes only the entry limit and preserves the current byte limit

New limits trim the cache immediately when no list is active; a list being captured or replayed remains pinned until the renderer releases it

Eviction favours frequently reused lists with greater estimated rebuild work and, under byte pressure, greater rebuild value per retained byte; an individually oversized list is rendered normally but bypasses retention

See also

ClearDisplayListCache, GetDisplayListCacheInfo