Hi Phil,

with SIP 4.7.6, PyQt 4.2.2, Qt 4.4.0:

========================================
import sip
import weakref
from PyQt4.Qt import *

class MyWidget(QWidget):
    def sizeHint(self):
        return QSize(900, 700)

app = QApplication([])

ws = MyWidget(None)
wr = weakref.ref(ws)

L = QVBoxLayout(None)
L.addWidget(ws)
L.activate()
del L
del ws

import gc
gc.collect()

assert wr() is None
========================================

The assert triggers, meaning that the object of type MyWidget is not released.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to