<br>&nbsp;&nbsp; Thanks Phil for your help with our memory lapse.<br><br>&nbsp;&nbsp; We've come across another issue:&nbsp; the Python garbage collector isn't sussing out circular references properly.<br><br>&nbsp;&nbsp; A previous post by you say that this should be working:<br><br>http://www.riverbankcomputing.com/pipermail/pyqt/2007-May/016237.html<br><br>&nbsp;&nbsp; Here's a simple demonstration:<br><br>&gt;&gt;&gt; from PyQt4.QtCore import QObject<br>&gt;&gt;&gt; class q(QObject):<br>...&nbsp;&nbsp; def init(self):<br>...&nbsp;&nbsp;&nbsp;&nbsp; QObject.init(self)<br>...&nbsp;&nbsp; def __del__(self):<br>...&nbsp;&nbsp;&nbsp;&nbsp; print 'q deleted.'<br>...<br>&gt;&gt;&gt; q1 = q()<br>&gt;&gt;&gt; q1 = None<br>q deleted.<br>&gt;&gt;&gt; q2 = q()<br>&gt;&gt;&gt; q2.circularReference = q2<br>&gt;&gt;&gt; q2 = None<br>&gt;&gt;&gt; q3 = q()<br>&gt;&gt;&gt; q3.circularReference = q3<br>&gt;&gt;&gt; q3.deleteLater()<br>&gt;&gt;&gt; q3 = None<br>&gt;&gt;&gt; import
 gc<br>&gt;&gt;&gt; gc.collect()<br>0<br>&gt;&gt;&gt; q4 = q()<br>&gt;&gt;&gt; q4.circularReference = q4<br>&gt;&gt;&gt; q4.circularReference = None<br>&gt;&gt;&gt; q4 = None<br>q deleted.<br><br>&nbsp;&nbsp; q2 and q3 are never gc'ed.<br><br>&nbsp;&nbsp; We're also seeing this in production.&nbsp; Are we doing something wrong?&nbsp; <br><br>Charles.<br><br>see: http://www.google.com/search?source=ig&amp;hl=en&amp;q=pyqt+%22circular+references%22&amp;btnG=Google+Search<br><br><br><b><i>Phil Thompson &lt;phil@riverbankcomputing.co.uk&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On Monday 30 July 2007 5:16 pm, charles chen wrote:<br>&gt;    We're having trouble seeing the QMdiArea's subWindowActivated signal.<br>&gt;<br>&gt;    Is this related to the "signal/slot handling fix." from 7/16-7/20?<br>&gt; http://www.riverbankcomputing.com/Downloads/Snapshots/PyQt4/ChangeLog<br>&gt;<br>&gt;   
 We're using:<br>&gt; sip-snapshot-20070612.zip<br>&gt; PyQt-win-commercial-4-snapshot-20070612.zip<br>&gt;<br>&gt; The relevant code:<br>&gt;<br>&gt;    self.__workspace__ = QMdiArea()<br>&gt;    QObject.connect( self.__workspace__, SIGNAL('subWindowActivated (<br>&gt; QMdiSubWindow * window )'), self.handleSubwindowActivated )<br>&gt;<br>&gt;    def handleSubwindowActivated(self, ignore=None ):<br>&gt;         ...<br>&gt;<br>&gt; Here's a link to the Qt docs of the signal:<br>&gt; http://doc.trolltech.com/4.3/qmdiarea.html#subWindowActivated<br><br>Don't pass argument names to SIGNAL().<br><br>Phil<br></blockquote><br>