[PyKDE] DCOP memory leak

Tim De Graeve TimDGCB at gmail.com
Wed Jan 31 20:17:42 GMT 2007


Hi,

I'm writing a script for Amarok in python that has to do a lot of DCOP
calls in a short amount of time.
Now, I have noticed that every time I do a DCOP call my program grows in
memory usage, the short program below demonstrates this:

from dcopext import DCOPClient, DCOPApp   

dcop=DCOPClient()
dcop.attach()

while 1:   
    AmarokDcopRes = DCOPApp ("amarok", dcop)
    ok, ms = AmarokDcopRes.player.trackCurrentTimeMs()
    print ms


Note that in the program I'm writing the while loop is replaced by a
timer event.
I also noticed that the program only grows in memory use once the 'ok,
ms = AmarokDcopRes.player.trackCurrentTimeMs()' code is executed.

I already posted my problem on the comp.lang.python Usenet-group and
someone suggested to post here because my problem seems more to be pyKDE
and DCOP related.
Does someone have any suggestions on how I can avoid this memory leak?

Kind regards,

Tim




More information about the PyQt mailing list