New submission from Jeroen Demeyer <[email protected]>:

This is a memory leak:

>>> while True:
...    def f(): pass
...    f.__doc__ = f

This also:

>>> while True:
...     f = [].append                                                           
                                                                                
        
...     f.__module__ = f

This is because the classes "function" and "builtin_function_or_method" do not 
implement tp_clear.

----------
messages: 316125
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: Memory leaks in functions

_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33418>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to