Message263053
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()) |
|
Date |
User |
Action |
Args |
2016-04-09 01:02:03 | Kevin Modzelewski | set | recipients:
+ Kevin Modzelewski |
2016-04-09 01:02:03 | Kevin Modzelewski | set | messageid: <1460163723.35.0.208266777223.issue26718@psf.upfronthosting.co.za> |
2016-04-09 01:02:03 | Kevin Modzelewski | link | issue26718 messages |
2016-04-09 01:02:02 | Kevin Modzelewski | create | |
|