Bug in Py_Finalize() ?

Owen F. Ransen ransen_spam_me_not at nemo.it
Fri Mar 2 04:32:12 EST 2001


Trying to find a bug in my C extension I ended up writing
this loop:

    for (UINT i = 0 ; i < 10 ; i++) {
        Py_Initialize();
        Py_Finalize() ;
    }

which crashes Python when i=8 with the message:
Windows 32, VC++ program.

Fatal Python error: UNREF invalid object

My understanding is that I can use Py_Initialize() and
Py_Finalize() in pairs to free up memory and to start
with a clean interpreter each time I need it. And that
is why I'd like to use Py_Finalise....




--
Owen F. Ransen
http://www.ransen.com/
Home of Gliftic & Repligator Image Generators



More information about the Python-list mailing list