[PyKDE] ANN: New Releases of PyQt, PyKDE, SIP and QScintilla

Phil Thompson phil at riverbankcomputing.co.uk
Sun Sep 4 21:49:37 BST 2005


On Sunday 04 September 2005 9:02 pm, David Boddie wrote:
> On Sunday 04 September 2005 21:30, Phil Thompson wrote:
> > It looks like the KLibFactory::createObject() SIP specification is
> > missing a /Factory/ annotation. This cause the generated virtual handler
> > to transfer ownership to C++ before calling Py_XDECREF(sipResObj) so the
> > C++ dtor doesn't get called when sipResObj is garbage collected.
>
> I'll rebuild with that change and see how things behave.
>
> > If you are reimplementing createObject() then (I think) you will need to
> > do the same...
> >
> >     sip.transferto(plugin, None)
> >     return plugin
>
> I thought this just meant that the C++ wrapper stays around, but the Python
> implementation is still collected. My plugin's __del__ method is still
> called, just as before.

No - the C++ instance (not the wrapper) stays around.

Phil




More information about the PyQt mailing list