mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Found another memory leak in longrangeiter. And redo the previous correction
without calling PyType_Ready(). Question 1: Should the interpreter register all types with PyType_Ready()? Many types seem to avoid it. Question 2: To reproduce the problem, run the following code: def f(): while True: for a in iter(range(0,1,10**20)): pass f() And watch the memory used by the process. How do we test this in a unittest?
This commit is contained in:
parent
519a042c7c
commit
b7f17e4bb4
2 changed files with 2 additions and 4 deletions
|
@ -1509,9 +1509,6 @@ _Py_ReadyTypes(void)
|
|||
|
||||
if (PyType_Ready(&PyStdPrinter_Type) < 0)
|
||||
Py_FatalError("Can't initialize StdPrinter");
|
||||
|
||||
if (PyType_Ready(&PyRange_Type) < 0)
|
||||
Py_FatalError("Can't initialize 'range'");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue