I've got a little bit confused about ownership of objects in SIP As far as I understand, if ParentObject owns ChildObject, the destruction of ChildObject is left to c++ i.e. the c++ destructor of ParentObject is expected to destruct ChildObject. This behaviour may result in a seg fault if the python programmer does not make sure that ChildObject goes out of scope before ParentObject does. Indeed, there are many scenarios where this may happen accidentally.
That's what I would like to have: The ChildObject keeps a reference on ParentObject that is released during destruction of ChildObject, where the Python destructor of ChildObject must not call the c++ destructor of the wrapped c++ instance (this is done during destruction of ParentObject). I am wondering if this behavior is possible to achieve in SIP. _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt