<br><br><div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Dan Williams</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 2007-07-18 at 09:01 -0700, Aneto Okonkwo wrote:<br>> Hi,<br>><br>> Im a bit new to gtk and have had continuing performance issues with<br>> the activity that we are working on. I am trying to figure out which
<br>> uses less memory gtk.Image or gtk.gdk.pixbuf and how much of a<br>> difference? I have done some tests of my own but its not clear yet.<br><br>gtk.Image is a GtkWidget, which you can embed into a window and do a lot
<br>of other stuff with. I can display itself onscreen.<br><br>gtk.gdk.Pixbuf is not a displayable widget, it's just a backing store<br>for pixel data that can be manipulated. You can pass a GdkPixbuf to a<br>GtkImage and have the image use the pixbuf as the backing buffer.
<br><br>So they are quite different things. You probably only want to use a<br>gtk.Image when you want to display the thing on screen in a window.<br><br>> Also, how can I clear/delete/unref the image or pixbuf once I am done
<br>> using it? gc.collect() doesnt seem to make an impact and I wasnt able<br>> to find a clear description of the syntax for this on the net. Thanks<br><br>You could try just 'del pixbuf' but I think that has an impact on the GC
<br>process in python? I must admit I'm not as knowledgable about that<br>particular interaction between python GC and PyGTK as I should be. but<br>it's probably more related to general Python GC than anything else.
</blockquote><div><br>I think you need a del and than an explicit gc.<br><br>Marco</div></div>