Add an "assert mode" to -X showrefcount
that fails when references leak
#94755
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-feature
A feature request or enhancement
The
-X showrefcount
option currently prints the number of references at exit.Once we get the number to 0, we should test that it stays that way. It would be nice to add a mode, say
-X showrefcount=assert0
or-X checkrefcount
, that exits with nonzero if refs/blocks remain. Then it can be used in subprocess tests.cc @vstinner
The text was updated successfully, but these errors were encountered: