Repository navigation
Highlights tab: rows are freed after each refill, no memory leak (#812) - #814
Merged
Merged
Conversation
ListPanel::AddItem keeps the row's MakeCopy (KeyValues slot 21), never the row itself, and DeleteAllItems frees its copies through deleteThis (slot 24), so the tab frees its own row through that slot right after AddItem. verify_studio_panel.py checks all four on both builds, and no longer lets the ComboBox check's local `ok` overwrite the run's result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Probe test (DLL
|
This was referenced Oct 18, 2026
Owner
Author
Probe test on today's dev, together with #820 #806 #804 #816 #814 (2026-10-18)One local build of dev b7603c4 (with #734 kill-feed scale, #838, #840) + #820 + #806 + #804 + #816 + #814 merged (
Frames: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release note: none
Stacked on #804 (
feat/load-strip-797), so CI does not run on it; local results are below. Retarget todevonce #804 merges.What changes
streaks_tab::fillnow frees each Highlights row throughKeyValues::deleteThisright afterListPanel::AddItem, instead of leaking it on every refill (every change to the Player box since #804). The "left rather than freed" comment is gone.Why it is safe: AddItem copies the row
Read in GameUI.dll on both builds:
ListPanel::AddItem(slot 151)call [eax+0x54]ondata, result stored as the item's KeyValues (mov [esi], eaxat +0x6052e)mov [ebx], eaxat +0x69469KeyValues::MakeCopy(slot 21)push 0x18; call keyvalues_new(+0x53bc0), copies the value and the subkeysKeyValuesSystem()->Alloc(0x18), same copyKeyValues::deleteThis(slot 24)KeyValuesSystemslot +0xc)KeyValuesSystemslot +0xc)ListPanel::DeleteAllItems(slot 165)call [edx+0x60](deleteThis) on each of the list's own copiescall [eax+0x60]keyvalues_newallocates throughKeyValuesSystemslot +8 on both builds (PRE +0x53bc0, POST +0x44330), the allocator that deleteThis frees through. deleteThis is a vftable slot (24) and is the same on both builds, so it is a slot constant (KEYVALUES_SLOT_DELETE_THIS), likeKEYVALUES_SLOT_SET_STRING, not a per-build address.The other places that touch KeyValues for a vgui control (
demo_list_folders.rs, the Demos tab instudio_panel.rs,list_icons.rs) only edit rows the list owns, read back throughGetItem. Only the Highlights tab allocates its own, so this fix covers the only leak of this kind. GameUI's own Load Demo fill (file_dialog_fill) never frees its rows either, on both builds; that is the stock game's leak, once per window open, and this PR does not touch it.Verifier
tools/verify_studio_panel.pygets a new check (26) for the four facts above on both builds. It also fixes a bug in the script: the ComboBox check assigned took, the variable that holds the whole run's result, so any earlier FAIL still ended in "OFFSETS VERIFIED". It now uses its own name. Both installs: no FAIL lines,OFFSETS VERIFIED.Local results
cargo test -p goldsrc-hooks --target i686-pc-windows-msvc --locked: 580 passed, 0 failed, 1 ignoredrustup run 1.98.1 cargo clippy -p goldsrc-hooks --all-targets --locked --target i686-pc-windows-msvc -- -D warnings: cleanrustup run 1.98.1 cargo clippy -p goldsrc-hooks --all-targets --locked -- -D warnings: cleanrustup run 1.98.1 cargo fmt --all --check: cleanpython goldsrc-hooks/tools/verify_studio_panel.py(PRE and POST): OFFSETS VERIFIEDLive check needed
Test DLL:
local\test-812\dodstudio_goldsrc_hooks.dll(+ .pdb). Do this on both PRE and POST:wsod25_grp2_h1_hltv, 174 rows) and open the Highlights tab once its analysis is done: every row draws, with Row #, Player, Kills, Time, Dur. and Details filled in.Closes #812
🤖 Generated with Claude Code