[PyKDE] Memory leak in QFileDialog?
Tuvi, Selim
stuvi at slac.stanford.edu
Sat Apr 10 15:31:01 BST 2004
Well unfortunately python never deletes the objects if that is the case. If I keep doing it like 30-40 times, I run into GUI stability issues like windows suddenly start blinking, dialogs don't show their contents. I first thought that Windows was running out of GUI resources but that shouldn't be the case since Windows XP doesn't have that limitation (Windows 98 had that problem).
I also tried forcing garbage collection by doing gc.collect() but that didn't make a difference.
-Selim
-----Original Message-----
From: Simon Edwards
To: pykde at mats.imk.fraunhofer.de
Sent: 4/9/2004 11:51 PM
Subject: Re: [PyKDE] Memory leak in QFileDialog?
On Saturday 10 April 2004 05:28, Tuvi, Selim wrote:
> I am experiencing memory leak like behavior when I use the
instantiation
method of opening a file with QFileDialog under Windows XP.
> Attached is a modified version of the application.py script. If I
click on
"Open File" toolbar icon and escape out about 8 times then the task
manager
memory usage increases by about 1Kbytes.
Each time load() runs it creates and uses a new object. The "leak like"
behaviour is the bunch of object in memory.
> I tried deleting the object after usage but that didn't change the
outcome.
'del' does actually delete the object like in C++. 'del breaks the
reference
from that variable to the object. When python feels like it, it will
clean up
and free memory.
> If I go back to using QFileDialog.getOpenFileName instead then I don't
observe the memory increase.
QFileDialog.getOpenFileName doesn't create a new object. Therefore you
don't
get a build up of objects.
cheers,
--
Simon Edwards | Guarddog Firewall
simon at simonzone.com | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."
_______________________________________________
PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
More information about the PyQt
mailing list