Skip to content

AssetScope

Defined in: asset/AssetLease.ts:45

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:85

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

number

absorb(other): void

Defined in: asset/AssetLease.ts:70

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:48

T

AssetLease<T>

AssetLease<T>


forget(lease): boolean

Defined in: asset/AssetLease.ts:77

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

AssetLease

boolean


releaseAll(): void

Defined in: asset/AssetLease.ts:56

Hand back the current batch in reverse order, attempting all releases. A failure is reported after cleanup; acquisitions made by cleanup belong to the next batch.

void