]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Found another memory leak in longrangeiter. And redo the previous correction
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 15 Nov 2007 20:52:21 +0000 (20:52 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 15 Nov 2007 20:52:21 +0000 (20:52 +0000)
commitb7f17e4bb4627a0a8bd9a4fe20e9f4e26e9a4d28
tree5c38ca1612fe95bee26dce5af472585b33fd0a74
parent519a042c7c248e3ae23cf2a3c1152f91a5bd2791
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?
Objects/object.c
Objects/rangeobject.c