[PyKDE] Request for Testing
Giovanni Bajo
rasky at develer.com
Mon Aug 22 15:51:15 BST 2005
Giovanni Bajo <rasky at develer.com> wrote:
>> Eventually produced... :) Attached to this mail.
Followup: it could be reduced a little bit more. Attached again.
--
Giovanni Bajo
-------------- next part --------------
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import gc
import weakref
from qt import *
app = QApplication([])
class OO(object):
pass
tp = OO()
wr = weakref.ref(tp)
dlg = QWidget(None)
foo = QWidget(dlg)
foo.r = tp
foo.kkk = foo
del foo
del dlg
del tp
gc.collect()
assert not gc.garbage
print wr
assert wr() is None
More information about the PyQt
mailing list