Re: Embedding Python - Deleting a class instance

2005-06-21 Thread Bue Krogh Vedel-Larsen
Jeff Epler <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > Unless there's a cycle and GC gets involved, all there is to deleting > *anything* in Python is correctly managing the refcount. On the other > hand, you can never free an object while it is still reachable. Some > local name

Embedding Python - Deleting a class instance

2005-06-21 Thread Bue Krogh Vedel-Larsen
How do I delete a class instance created using PyInstance_New? I've tried calling Py_CLEAR on the instance, but __del__ isn't called. I've also tried calling PyObject_Del, but this gives an access violation in _PyObject_DebugDumpAddress so I guess that ain't a good idea :) I've noticed that the

Custom type: PyObject_IS_GC access violation

2005-06-09 Thread Bue Krogh Vedel-Larsen
I'm extending my C++ app by embedding Python 2.4.1 in it. The app is multithreaded and split into several DLL's. The main EXE calls Py_Initialize and Py_Finalize and each DLL gets a seperate interpreter with Py_NewInterpreter. The problem comes when I try to add a new type. I've been following