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
-X showrefcountoption 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=assert0or-X checkrefcount, that exits with nonzero if refs/blocks remain. Then it can be used in subprocess tests.cc @vstinner