Mark Dickinson added the comment:

It's the f_back reference from the inner frame that's keeping the outer frame 
alive.

Here's a picture of the create garbage: http://imgur.com/a/OCRe3

And here's the script that created it:


import gc
import refcycle
import sys
import traceback

def hold_world():
    try:
        raise Exception("test1")
    except Exception as exc:
        tmp = exc

def use_obj( o ):
    hold_world()

def main():
    gc.disable()
    gc.collect()
    o = ["survivor"]
    use_obj( o )
    garbage = refcycle.garbage()
    garbage.export_image()


if __name__ == '__main__':
    main()

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31005>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to