[ python-Bugs-1256669 ] Significant memory leak with PyImport_ReloadModule
SourceForge.net
noreply at sourceforge.net
Thu Aug 11 14:49:37 CEST 2005
Bugs item #1256669, was opened at 2005-08-11 12:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1256669&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Held (bheld)
Assigned to: Nobody/Anonymous (nobody)
Summary: Significant memory leak with PyImport_ReloadModule
Initial Comment:
Having recently upgraded to Python 2.4, I am having a
large memory
leak with the following code built with VC++ 6.0:
PyObject *pName, *pModule;
Py_Initialize();
pName = PyString_FromString(argv[1]);
pModule = PyImport_Import(pName);
Py_DECREF(pName);
PyObject* pModule2 =
PyImport_ReloadModule(pModule);
Py_DECREF(pModule2);
Py_DECREF(pModule);
Py_Finalize();
return 0;
I get leaks of over 500 kb. I have another program which
is much more
complex, in which every call to PyImport_ReloadModule
is leaking 200+
kb, even though I am calling Py_DECREF correctly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1256669&group_id=5470
More information about the Python-bugs-list
mailing list