Giovanni Bajo <[EMAIL PROTECTED]> wrote:
>> Eventually produced... :) Attached to this mail.
Followup: it could be reduced a little bit more. Attached again.
--
Giovanni Bajo
#!/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
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde