Skip to content

Loader: evicted seamless handles retained strongly in _deferred (A4) #276

Description

@Exoridus

From the 2026-07-11 assets audit (A4/X1, P2): evicted seamless handles are re-registered in _deferred for the loader's lifetime (identity preserved for healing). GPU memory IS freed (evict -> setSource(null) -> version bump), but the Texture/Sound JS objects never GC even after the game drops all references. For a streaming open world that claims/releases thousands of textures, _deferred accumulates dead 0x0 handles unbounded.

Options from the audit: hold evicted handles via WeakRef/FinalizationRegistry, or drop them from _deferred and re-mint on next get (accepting identity break for fully-released keys). Self-flagged in Loader.ts as the paragraph-7 weak-retention follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions