Skip to content

AssetScope

Defined in: asset/AssetLease.ts:39

Everything one owner acquired, released together.

Holds receipts rather than paths, so unloading releases what was actually acquired — not what the manifest says this owner would acquire if it loaded today. A failed acquisition produced no lease, so there is nothing to release and nothing to guess about.

new AssetScope(): AssetScope

AssetScope

get size(): number

Defined in: asset/AssetLease.ts:76

How many acquisitions this scope still owes. Diagnostics and tests.

number

absorb(other): void

Defined in: asset/AssetLease.ts:61

Take over every receipt other holds; it owes nothing afterwards.

The transfer an owner needs when the acquiring code is not the owning code: a loader acquires into a scope of its own and hands the whole thing to whoever will outlive it.

AssetScope

void


add<T>(lease): AssetLease<T>

Defined in: asset/AssetLease.ts:42

T

AssetLease<T>

AssetLease<T>


forget(lease): boolean

Defined in: asset/AssetLease.ts:68

Stop tracking one lease without releasing it — for an ownership transfer.

AssetLease

boolean


releaseAll(): void

Defined in: asset/AssetLease.ts:48

Hand back everything, in reverse acquisition order.

void