Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: Yes, I think what I wrote above applies here: the string is stored in the "args" variable. When the exception is raised, the traceback contains the *live* frame objects, with position in the bytecode and all local variables. This allows post-mortem debugging, for example.
Try calling PyErr_PrintEx(0) instead of PyErr_Print(), this should clear the exception state without storing it in sys.last_traceback, and the reference will decrease. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com