[Python-bugs-list] [ python-Bugs-543148 ] Memory leak with stackframes + inspect

noreply@sourceforge.net noreply@sourceforge.net
Fri, 12 Apr 2002 11:48:30 -0700


Bugs item #543148, was opened at 2002-04-12 20:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=543148&group_id=5470

Category: None
Group: Python 2.1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Bernhard Herzog (bernhard)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory leak with stackframes + inspect

Initial Comment:
The following program leaks memory on Python 2.1.3:

import inspect

def leak():
    frame = inspect.currentframe()

while 1:
    leak()

(On Linux at least the process size grows *very*
quickly!)

System:
Python 2.1.3 (#1, Apr 12 2002, 20:09:56) 
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2


It has no memory problems with Python 2.2.

Workaround: del frame in leak.
The docs at least should mention this.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=543148&group_id=5470