[PyKDE] Re: clone member function deleting object

Paul F. Kunz Paul_Kunz at slac.stanford.edu
Mon Mar 14 17:44:19 GMT 2005

>>>>> On Mon, 14 Mar 2005 16:54:49 -0000 (GMT), "Phil Thompson" <phil at riverbankcomputing.co.uk> said:

> You must either keep a reference or transfer ownership to C++ using
> sip.transfer() - and make sure you call the C++ dtor explicitly at
> some stage to avoid a memory leak.

   I'll try sip.transfer().   

> What you haven't shown is the Python code that calls clone().

   No Python code calls clone().   C++ class clone().   With what it
gets back, it can display the function graphically and also preform a
fitting process against a data set.   There are built in C++ functions
the user can do the same with, but the idea is for the user to provide
a custom function in Python.

More information about the PyQt mailing list