[docs] [issue33814] exec() maybe has a memory leak

Eric V. Smith report at bugs.python.org
Sat Jun 9 13:44:32 EDT 2018


Eric V. Smith <eric at trueblade.com> added the comment:

It would be helpful if you could show what output you see, and how it differs from what you expect.

I think you're just seeing reference cycles or some other delayed garbage collection. If you put in a gc.collect() in your loops to force a collection, you'll see the reference numbers drop back.

There's no way we would deprecate globals and locals params to exec().

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33814>
_______________________________________


More information about the docs mailing list