Skip to content

bug: resource leaks in console hide() and three.js GPU material cache #1249

Description

@YayoRazo

Description

Two resource leaks in different packages:

  1. core/console.ts: hide() does not call stopAutoScroll(). If auto-scroll was started via text selection drag, the 50ms interval continues firing markNeedsRerender() and mutating scroll state even while the console is hidden.

  2. three/ExplodingSpriteEffect.ts: static baseMaterialCache is a Map that caches GPU materials but is never cleared. ExplosionManager.disposeAll() disposes all active explosions but leaves the cached materials in GPU memory.

Steps to reproduce

  1. Open the console, start a text selection drag to the edge (activates auto-scroll), hide the console — the interval keeps firing
  2. Create and dispose multiple ExplodingSpriteEffect instances with different textures — GPU memory grows unboundedly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions