Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff57aef

Browse files
committed
update notes to talk about -X showrefcount
1 parent 3da9fbb commit ff57aef

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Misc/SpecialBuilds.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ Py_REF_DEBUG
1313
------------
1414

1515
Turn on aggregate reference counting. This arranges that extern _Py_RefTotal
16-
hold a count of all references, the sum of ob_refcnt across all objects. In a
17-
debug-mode build, this is where the "8288" comes from in
16+
hold a count of all references, the sum of ob_refcnt across all objects.
17+
Passing ``-X showrefcount`` on the command line causes the interactive
18+
interpreter to print the reference count total as well the number of memory
19+
blocks allocated after each statement:
1820

1921
>>> 23
2022
23
21-
[8288 refs]
23+
[8288 refs, 14332 blocks]
2224
>>>
2325

2426
Note that if this count increases when you're not storing away new objects,

0 commit comments

Comments
 (0)