[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QTimer memory leek
From:       Giovanni Bajo <rasky () develer ! com>
Date:       2007-10-29 19:10:08
Message-ID: 47263010.5060705 () develer ! com
[Download RAW message or body]

On 10/28/2007 11:58 AM, Phil Thompson wrote:
> On Friday 26 October 2007, Никитин Артем wrote:
>> Hello,
>>
>> I got memory leak problem with QTimer (PyQt 4.3.1). Further, short example
>> to detect problem.
>>
>> import sys
>> from PyQt4 import QtCore, QtGui
>>
>> def schedule():
>>   QtCore.QTimer.singleShot(0, schedule)
>>
>> def main( ):
>>   qApp  = QtGui.QApplication(sys.argv)
>>   schedule()
>>   sys.exit(qApp.exec_())
>>
>> main()
> 
> This is a known feature but I agree that it's a problem in this particular use 
> case. Fixed in tonight's snapshot.

2007/10/28 10:51:13  phil
Universal proxy slots will now be reused when repeatedly connected to 
the same
Python slot so as not to leak memory in long running code.  The use case is
calling QTimer.singleShot() in a loop.


Mind detailing this a bit? Why is this fix necessary as not to leak 
memory? Shouldn't the universal slots be collected anyway, sooner or later?
-- 
Giovanni Bajo



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic