Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • When a frame is destroyed everything in that frame is also destroyed so I don't think you should have any problems with memory here. I believe its automatically managed. Commented Jul 30, 2018 at 21:28
  • After some more research it seems that my problem is solved by PEP 442 but I am stuck with python 2.7 and before python 3.4 the interpreter will not call destructors on objects that are part of a reference cycle and have a __del__ method (see this answer) Commented Jul 31, 2018 at 8:11