<br><br><div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Dan Williams</b> &lt;<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>&gt; 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>&gt; Hi,<br>&gt;<br>&gt; Im a bit new to gtk and have had continuing performance issues with<br>&gt; the activity that we are working on.&nbsp;&nbsp;I am trying to figure out which
<br>&gt; uses less memory gtk.Image or gtk.gdk.pixbuf and how much of a<br>&gt; 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.&nbsp;&nbsp;I can display itself onscreen.<br><br>gtk.gdk.Pixbuf is not a displayable widget, it&#39;s just a backing store<br>for pixel data that can be manipulated.&nbsp;&nbsp;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.&nbsp;&nbsp;You probably only want to use a<br>gtk.Image when you want to display the thing on screen in a window.<br><br>&gt; Also, how can I clear/delete/unref the image or pixbuf once I am done
<br>&gt; using it?&nbsp;&nbsp;gc.collect() doesnt seem to make an impact and I wasnt able<br>&gt; to find a clear description of the syntax for this on the net.&nbsp;&nbsp;Thanks<br><br>You could try just &#39;del pixbuf&#39; but I think that has an impact on the GC
<br>process in python?&nbsp;&nbsp;I must admit I&#39;m not as knowledgable about that<br>particular interaction between python GC and PyGTK as I should be.&nbsp;&nbsp;but<br>it&#39;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>