[issue27535] Memory leaks when opening tons of files
STINNER Victor
report at bugs.python.org
Tue Nov 21 09:46:11 EST 2017
STINNER Victor <victor.stinner at gmail.com> added the comment:
The problem is not the function displaying the warning, but warnings registries (__warningregistry__) no?
The behaviour depends on the action of the filter matching the ResourceWarning warning:
* always: don't touch the registry => no leak
* ignore: add the key to registry => leak!
* another action: add the key to registry => leak!
The key is the tuple (text, category, lineno).
I understand why always doesn't touch the registry. But why does "ignore" action touch the registry? Not only the user will not see the message, but the memory will slowly grow in the background.
----------
nosy: +vstinner
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27535>
_______________________________________
More information about the Python-bugs-list
mailing list