[PyKDE] Re: Memory leak & segfault with deleteLater
Giovanni Bajo
rasky at develer.com
Tue Aug 16 17:50:46 BST 2005
Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> 2. w1 and it's C++ instance won't be garbage collected (and the widget
might
> be visible) until the collector is run. Might this be too long to wait?
(It
> would be possible to explicitly run the collector at strategic points in
the
> sip module.)
I think this is calling for trouble, and I am not sure we should call the
collector behind an user's back, I'd rather that to be in full control of
the application. It's a rather big change in behaviour, too: it's pretty
common for a custom child widget to hold a Python reference to the custom
parent widget (though it could easily be acquired through parent()).
This said, I don't think there is a satisfactory solution for the problem.
Maybe we should just leave it as is, at least for now. I also don't think
that specific hacks with knowledge of the QObject semantics would be
acceptable.
Thanks anyway!
--
Giovanni Bajo
More information about the PyQt
mailing list