[PyKDE] DCOP memory leak

Kovid Goyal kovid at theory.caltech.edu
Wed Jan 31 23:24:33 GMT 2007


Does this help:
from dcopext import DCOPClient, DCOPApp
dcop=DCOPClient()
dcop.attach()

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

Kovid.
On Wednesday 31 January 2007 12:17:42 Tim De Graeve wrote:
> 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()
> 
>
> 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
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>
> !DSPAM:2,45c0fac944256935130580!



-- 
_____________________________________

Kovid Goyal  MC 452-48
California Institute of Technology
1200 E California Blvd
Pasadena, CA 91125

home  : +01 626 390 8699
office: +01 626 395 6595 (449 Lauritsen)
email : kovid at theory.caltech.edu
web   : http://www.kovidgoyal.net
_____________________________________




More information about the PyQt mailing list