Skip to content

fix(s): scenes release their contexts and listeners when closed - #1588

Open
rudolphpienaar wants to merge 2 commits into
mainfrom
sec/s-d
Open

rudolphpienaar wants to merge 2 commits into
mainfrom
sec/s-d

Conversation

@rudolphpienaar

@rudolphpienaar rudolphpienaar commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Stage S, items S2 and S12: viewers and scenes release what they hold when they close, measured in a real browser.

A new smoke stage, scene-disposal (apps/argus/tests/smoke/disposal.mjs), opens and closes the image viewer, the SLAB scene, the orrery and the DAG/universe scenes in rounds. Each scene's WebGL context must stand while open and be lost before any garbage collection. After the rounds, the JS heap and the window/document listener counts are checked. It uses only the run's own synthesized series and feed.

It found four leaks, each fixed here:

  • a closed image viewer kept Cornerstone's 7 pooled WebGL contexts until GC (Chromium allows 16); features/image/glContexts.ts finds and loses them;
  • the SLAB scene left its vtk objects undeleted and a document listener on its interactor;
  • every split layout render left 2 window listeners;
  • more_wire was re-wired on every listing render (it now takes an AbortSignal the roster host aborts).

Orrery disposes its renderer, forces context loss, then removes its canvas. Panes the surface keeps (the primary DAG, the universe) come back on the same context.

Smoke selection: SMOKE_ONLY/SMOKE_SKIP match literal prefixes, and a selected name that never ran is a failure. Proof the lane can fail: with orrery's forceContextLoss removed, it fails.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant