New submission from Kevin Modzelewski: The super() __init__ function fills in the fields of a super object without checking if they were already set. If someone happens to call __init__ again, the previously-set references will end up getting forgotten and leak memory.
For example: import sys print(sys.gettotalrefcount()) sp = super(int, 1) for i in range(100000): super.__init__(sp, float, 1.0) print(sys.gettotalrefcount()) ---------- components: Interpreter Core messages: 263053 nosy: Kevin Modzelewski priority: normal severity: normal status: open title: super.__init__ leaks memory if called multiple times versions: Python 2.7, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26718> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com