TXFAJavaScriptSession.TryGetIdentityStorageUsage
Unit: HPDFXFAEventScript
Declaration
function TryGetIdentityStorageUsage(out Bytes, Members: Int64): Boolean;
Behaviour
Reports the current native identity index's complete physical bytes and exact native member count
Returns True when the current engine exists and supports either optional retired-registry callback export, and False otherwise. The call does not create an engine or rebuild dirty state
An initialised empty index reports zero bytes and members. Since version 2.1139.0, noncanonical strings are included. Version 2.1140.0 also includes primitive scalars when the current bridge supports the typed value registry. Version 2.1141.0 includes objects, functions and Symbols admitted through the installed function's own strongValues=true data capability
Native member counts include distinct reference identities, so same-shaped objects remain separate and duplicate references count once. Earlier scalar-only V2 and V1 bridges keep reference membership in the strong JavaScript Set fallback; those fallback members are excluded
Bytes reports the physical index and key payload, not the separate native strong-root vector or retained object payload. Those allocations remain subject to the ordinary VM memory budget and may grow linearly; this call does not measure total Session or process memory
The index is reconstructed with the engine during replay and rollback, so these values describe current engine storage rather than a separately persistent history snapshot. Its physical bytes also count against MaxJournalBytes