[python-win32] Memory leak when importing in embedded python
mhammond at skippinet.com.au
Thu Aug 21 02:51:05 CEST 2008
> Importing some modules in embedded python between Py_NewInterpreter
> Py_EndInterpreter cause memory leak. Not all the modules cause leaks
> sys module) but most of them do! And none of them cause any leak when
> are not embedded! What cause this? Is it solveable?
Its probably not solvable. Py3k, IIUC, has some changes to make it
solveable, but even then you will be relying on each module doing the right
thing. Google will show you *lots* of references to this problem. The
simple answer is to not init/finalize Python multiple times.
More information about the python-win32