El vie, 27-02-2004 a las 14:32, -0300, Christian Robottom Reis escribió:
On Tue, Feb 17, 2004 at 11:15:52AM +0000, Gustavo J. A. M. Carneiro wrote:
> A Ter, 2004-02-17 às 00:49, Arturo González escreveu:
> > I'm having a memory leak somewhere when refreshing the content of a
> > HBox. I'm not doing it in a optimized way, i know, but i want to find
> > where is the error. To remove all the content, I did:
> > 
> >  for i in (self.box.get_children()):
> >                 self.box.remove(i)
> > 
> > Then i pack again all the elements (some have changed) in the box.
> > 
> > I suppose that, if no references are found to self.box's childrens, they
> > are garbage-collected :P, aren't they? 
> 
>   Yes... eventually!  There has been change a few months ago with the
> way pygtk does memory management.  Before that change, objects would be
> freed as soon as the reference count dropped to zero.  Now, however,
> when an object loses all external references it is handed over to
> Python's cyclic garbage collector.  The GC doesn't free objects right
> away.  It only does its work periodically or when certain thresholds are
> reached.  I suggest you look at the documentation for module gc for more
> information on this.  For example, you can explicitly tell the gc to run
> at any time, to free unreference objects.

The relevant bug is at:

    http://bugzilla.gnome.org/show_bug.cgi?id=110261

Arturo, did a gc.collect() fix your problem?

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331

Yes, sorry about this issue, i forgot to answer on the list again. Gjc resolved this to me at #pygtk, so, gc.collect() solve the problem :D

Thank you ppl,

--
Arturo Gonzalez <[EMAIL PROTECTED]>

<<attachment: smiley-1.png>>

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to