[PyKDE] ANN: SIP v4.2rc2 Released

Phil Thompson phil at riverbankcomputing.co.uk
Sat Feb 26 11:20:43 GMT 2005


On Monday 21 February 2005 3:12 pm, Nahuel Greco wrote:
> On Fri, 18 Feb 2005 23:51:46 +0000
>
> Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> > I see the memory leak in the test_py_leak.py, but it's what I would
> > expect given what the script does. Because QDialog has a parent,
> > ownership (ie. responsibility for destroying the QDialog) is transfered
> > to the parent. The statement...
> >     f = None
> > ...has no effect at all on the memory usage. The memory would only be
> > recovered when the QMainWindow instance was garbage collected.
> > The comments in the script state that there was no difference if the
> > QDialog had no parent - I did not see that behaviour. If I changed the
> > script... f = QDialog()
> > ...it executed in constant space - no memory leak.
>
> Ok, testing with a parented QDialog() was an erroneous test, you are right.
> But I keep seeing a memory leak with 'f = QDialog()', with a slower rate
> that the parented one has. Note that I'm having also memory leaks with
> "f = QString('1234 1234')" and  "f = QCustomEvent(1)".
>
> I'm attaching the logs for these, please check if you can't see the
> "f = QDialog()" memory leak after the same number of iterations that I do
> (I added the iteration number to the log). The same for QString and
> QCustomEvent.

Hopefully the attached shows that SIP 4.2 really, really doesn't have a memory 
leak.

Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_py_leak.out.gz
Type: application/x-gzip
Size: 2394 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050226/64ed1eb1/test_py_leak.out.gz


More information about the PyQt mailing list