On Mon, 2012-12-10 at 14:47 -0500, John Ehresman wrote: > On 12/10/12 1:20 PM, Henry Gomersall wrote: > > On Mon, 2012-12-10 at 12:53 -0500, John Ehresman wrote: > >> Qt defines some common classes (e.g. QObject) and some rules that > >> govern > >> when objects are deleted. I'm sure that a large part of the work > that > >> went into PySide was to manage the lifetime and behavior of Python > >> wrapper objects based on how Qt works. This sort of code is Qt > >> specific > >> and not generic. > > > > Can you give me an example of the problem here? I mean, is the issue > > that the binding code needs to keep track of when (say) a QObject is > > deleted (in which case does QObjectCleanupHandler not provide that > > support) or is it that the bindings _should_ be deleting objects > based > > on some documented rules? > > QObjectCleanupHandler could potentially be very useful, though I or > someone else would need to look at how it works. QObjects also need > to > be deleted if they have no parent and no Python code references them, > though there may be exceptions to that rule. PySide's typesystem > files > are substantial and some of the code in them was added to handle > special > cases. > > But, my main point was all of this is Qt specific. I was involved > somewhat with pygtk where many of the issues were the same, but the > mechanisms to solve them depended on the glib/GObject runtime rather > than the Qt/QObject runtime.
Yeah, I appreciate that. I wasn't challenging your point, just trying to work out the details. I might have a play with this sort of stuff when I have some free time. Cheers, Henry _______________________________________________ PySide mailing list PySide@qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside