[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] wrapped C/C++ object of type has been deleted - yet it hasn't!
From:       Nyall Dawson <nyall.dawson () gmail ! com>
Date:       2017-07-25 22:45:18
Message-ID: CAB28AsjvZ1HDCBvVe541pqduqKnhDD4+nbcBNy0=bo=B6NxD_g () mail ! gmail ! com
[Download RAW message or body]

On 25 July 2017 at 21:57, Phil Thompson <phil@riverbankcomputing.com> wrote:

> > 
> > I suspect I'm misusing the /Factory/ annotation for createInstance()
> > here. But I can't see what the correct annotation should be. Any tips?
> 
> /Factory/ is used when the instance returned is guaranteed to be new to Python. In \
> this case it isn't because it has already been seen when being returned by \
> createInstance() - in which case the /Factory/ on create() should be removed. \
> However for a different sub-class implemented in C++ then it would be the first \
> time it was seen by Python so the /Factory/ on create() would be correct. 
> You might try using /TransferBack/ on create() instead - that might be the best \
> compromise.

Perfect, that fixed the issue for me. Many thanks!

Nyall
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic