Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-122420: Fix accounting for immortal, interned strings in refleak.py
The `_PyUnicode_Intern*` functions already adjust the total refcount, so
we don't want to readjust it in refleak.py.
  • Loading branch information
colesbury committed Jul 29, 2024
commit bbc1ddfec6c913bac0cbb5d60b21d9cef78ba57b
2 changes: 1 addition & 1 deletion Lib/test/libregrtest/refleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def get_pooled_int(value):
# Use an internal-only keyword argument that mypy doesn't know yet
_only_immortal=True) # type: ignore[call-arg]
alloc_after = getallocatedblocks() - interned_immortal_after
rc_after = gettotalrefcount() - interned_immortal_after * 2
rc_after = gettotalrefcount()
fd_after = fd_count()

rc_deltas[i] = get_pooled_int(rc_after - rc_before)
Expand Down