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

List:       pykde
Subject:    Re: [PyKDE] DCOP memory leak
From:       Kovid Goyal <kovid () theory ! caltech ! edu>
Date:       2007-01-31 23:24:33
Message-ID: 200701311524.34161.kovid () theory ! caltech ! edu
[Download RAW message or body]

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@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@theory.caltech.edu
web   : http://www.kovidgoyal.net
_____________________________________

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

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