On 17.11.09 18:13:39, Martin Teichmann wrote: > Hi again, list, > > as per Phil, I changed the code to be executed > in an event loop. The problem persists.
If I see things correctly, you misunderstood Phil. You're supposed to do the check in a timer-called-function, not the initialization. That is all this code: > # but they're still here! > # (following line prints four objects, but should print four Nones) > print wa(), wb(), wp(), wf() > > # OK, let's garbage collect > gc.collect() > > # still everything there (again, not a single None) > print wa(), wb(), wp(), wf() > > # that's the bug: still one reference, but no referrer > # (the line prints 1 [], getrefcount always gives 1 to high) > if wp() is not None: > print sys.getrefcount(wp()) - 1, gc.get_referrers(wp()) > > # assert that everything is gone > assert wa() is None > assert wb() is None > assert wp() is None > assert wf() is None Should be in a slot connected to a timer. Andreas -- You are fairminded, just and loving. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
