Martin Dunschen <mdunsc...@gmail.com> added the comment: Hello Antoine
Unloading would not be necessary if the DLL is just the python interpreter, but if you build a DLL with python embedded that does quite a bit more than some python interpreting (in my case complex C/C++ numerical calculations) unloading the DLL is a convenient way to free up unused resources. There are C++ classes that extend python in my code (via swig), and that's where the size of the DLL get's increased. If the handle leaks are restricted to the windows implementation of cpython, could it not be justified to allow C++ in a patch, I can't think of a C only compiler for windows? Thanks Martin On Thu, Oct 27, 2011 at 11:39 PM, Antoine Pitrou <rep...@bugs.python.org>wrote: > > Antoine Pitrou <pit...@free.fr> added the comment: > > Here is a patch that fixes some of these handle leaks in Python 3.2. > However, as a general guideline, you shouldn't unload the Python DLL if you > fish to use it later again. Just keep it in memory (the DLL isn't very big, > is it?). Yes, C++ would allow to solve this, but the interpreter is > currently written in C and there's no plan, even in the middle term, to > change this. > > ---------- > keywords: +patch > nosy: +loewis > Added file: http://bugs.python.org/file23539/freelocks.patch > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue10363> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10363> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com