While covering PlayerScreenHUD leftover (Wave 8 a2 tick 3, tests only) dispose() was driven with a troika Text stub.
What happens:createStatRow() adds four objects per row (label Text, bar background, bar fill, value Text) but only stores the value Text and the two bar meshes. dispose() walks those stored refs and removes/disposes them. The four row labels (HULL, SHIELD, ENERGY, HEAT) are never stored, so they stay in the HUD group with live geometries/materials.
User-visible: leaving a match (or rebuilding the HUD) leaks four troika text meshes and their GPU resources each time the player HUD is torn down.
Fix: store the label Texts (or dispose every group child the same way rebuildUI() already does) and null the refs so a second dispose() is safe.
Repro (jsdom, mocked troika): after dispose(), group.children is still [HULL, SHIELD, ENERGY, HEAT].
While covering `PlayerScreenHUD` leftover (Wave 8 a2 tick 3, tests only) `dispose()` was driven with a troika `Text` stub.
**What happens:** `createStatRow()` adds four objects per row (label Text, bar background, bar fill, value Text) but only stores the value Text and the two bar meshes. `dispose()` walks those stored refs and removes/disposes them. The four row labels (`HULL`, `SHIELD`, `ENERGY`, `HEAT`) are never stored, so they stay in the HUD group with live geometries/materials.
**User-visible:** leaving a match (or rebuilding the HUD) leaks four troika text meshes and their GPU resources each time the player HUD is torn down.
**Fix:** store the label Texts (or dispose every `group` child the same way `rebuildUI()` already does) and null the refs so a second `dispose()` is safe.
**Repro (jsdom, mocked troika):** after `dispose()`, `group.children` is still `[HULL, SHIELD, ENERGY, HEAT]`.
File: `projects/spikersoft/src/app/_components/_games/space-game/hud/player-screen-hud.ts`
Resolved in spikersoft-angular PR #819 (merged to master). PlayerScreenHUD.dispose disposes the four stat-row label Texts. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). PlayerScreenHUD.dispose disposes the four stat-row label Texts. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
While covering
PlayerScreenHUDleftover (Wave 8 a2 tick 3, tests only)dispose()was driven with a troikaTextstub.What happens:
createStatRow()adds four objects per row (label Text, bar background, bar fill, value Text) but only stores the value Text and the two bar meshes.dispose()walks those stored refs and removes/disposes them. The four row labels (HULL,SHIELD,ENERGY,HEAT) are never stored, so they stay in the HUD group with live geometries/materials.User-visible: leaving a match (or rebuilding the HUD) leaks four troika text meshes and their GPU resources each time the player HUD is torn down.
Fix: store the label Texts (or dispose every
groupchild the same wayrebuildUI()already does) and null the refs so a seconddispose()is safe.Repro (jsdom, mocked troika): after
dispose(),group.childrenis still[HULL, SHIELD, ENERGY, HEAT].File:
projects/spikersoft/src/app/_components/_games/space-game/hud/player-screen-hud.tsResolved in spikersoft-angular PR #819 (merged to
master). PlayerScreenHUD.dispose disposes the four stat-row label Texts. Closing.