[Python-bugs-list] [Bug #121060] memory leak in python 2.0

noreply@sourceforge.net noreply@sourceforge.net
Mon, 11 Dec 2000 09:28:36 -0800


Bug #121060, was updated on 2000-Nov-01 17:01
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Closed
Resolution: Works For Me
Bug Group: None
Priority: 5
Submitted by: xyld
Assigned to : bwarsaw
Summary: memory leak in python 2.0

Details: I seem to have stumbled on a memory leak that only seems to occur in Python 2.0, it doesn't happen in Python 1.5.2, and I've been told (but haven't verified) that it doesn't happen in 1.6 either.

It seems to happen when what I'd call a 'second order' import occurs, a really simple test case that leaks memory pretty fast -

------

in a directory called Shared, I have a file called test.py, with contents -

---
import time
---

and an __init__.py so that I can import it.

in the directory a level up I have a file called atest.py with contents -

---
from Shared import test

pass
---

and finally I have a file called tester.py with contents -

---
while 1:
    execfile('atest.py')
---

------

running tester.py with python 2.0 leaks memory, running it with python 1.5.2 remains at a constant usage.

Follow-Ups:

Date: 2000-Dec-11 09:28
By: bwarsaw

Comment:
Good, thanks for closing this.
-------------------------------------------------------

Date: 2000-Dec-11 07:47
By: akuchling

Comment:
This memory leak seems to be fixed in the CVS tree as 
of Dec. 12, so I'm closing this bug report.  (Barry, did you fix it and forget to close it?)
-------------------------------------------------------

Date: 2000-Nov-02 07:42
By: gvanrossum

Comment:
For Barry. I can indeed reproduce this!
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121060&group_id=5470