[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

A.M. Kuchling report at bugs.python.org
Sun Sep 8 17:20:08 CEST 2013


A.M. Kuchling added the comment:

Here's a patch implementing traceback.clear_tb_frames().  (Feel free to bikeshed about the name.)

One more substantial question: the top frame of the traceback is possibly still running.  Currently the code skips it by doing an initial 'tb = tb.tb_next'.  Would it be better to catch and ignore the RuntimeError 
from frame.clear()?

----------
stage: needs patch -> patch review
Added file: http://bugs.python.org/file31668/clear-tb-frames.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1565525>
_______________________________________


More information about the Python-bugs-list mailing list