[Python-bugs-list] [Bug #122684] Memory leak creating sub-interpreters
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 17 Nov 2000 08:31:56 -0800
Bug #122684, was updated on 2000-Nov-17 04:42
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Memory leak creating sub-interpreters
Details: Instantiating a sub-interpreter in Python 2.0 (compiled with Visual C++ 6 SP4) allocates memory that is never released. The problem can be reproduced using the following sample code:
/* For unmodified Python 2.0 (#8, Oct 16 2000, 17:27:58) */
#include "Python.H"
int main()
{
Py_Initialize();
PyEval_InitThreads();
PyThreadState* mainThread = PyEval_SaveThread();
for (;;)
{
PyEval_AcquireLock();
Py_EndInterpreter(Py_NewInterpreter());
PyEval_ReleaseLock();
}
PyEval_AcquireThread(mainThread);
Py_Finalize();
return 0;
}
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=122684&group_id=5470