mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
The minidom.Node class has a debug attribute which, when its _debug
flag is true, is set to a StringIO object that silently collects all debug messages. This is triggered by the Node._debug=1 statement at the top of test_minidom.py. After the tests, we better delete that StringIO object to avoid wasting memory. We also reset the _debug flag. (Note that this is an undetectable memory leak, and the memory doesn't get collected by the cycle-gc either, because it's all reachable -- it's just useless.)
This commit is contained in:
parent
ca1f426080
commit
9e79a25b8a
1 changed files with 2 additions and 0 deletions
|
|
@ -356,3 +356,5 @@ if works:
|
|||
else:
|
||||
print "\n\n\n\n************ Check for failures!"
|
||||
|
||||
Node.debug = None # Delete debug output collected in a StringIO object
|
||||
Node._debug = 0 # And reset debug mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue