Re: Mem leak in pixbuf engine



В Пнд, 31/10/2005 в 17:46 +0100, Detlef Reichl пишет:
> Hi,
> 
> i think i found a pixmap leak in the pixbuf engine. The following small
> program simply shows an continually updated progressbar. I also tried it
> with other widgets, but it seems to be a progressbar problem.
> 
> If i watch it in xrestop with a simple color theme all seems ok, but if
> i switch to a pixmap theme the number of allocated pixmaps increases
> dramatically. It seems that they don't get freed.
> 
> I've tried to track it down myself, but that goes a little bit to deep
> into gtk internals...
> 
> Cheers
> detlef
> 

Detlef, I've tried to reproduce this situation, but unsuccessfully. Can
you point to the versions of gtk+ and gtk2-engines you are using? Xorg
version also might be useful.

What pixmap theme are you writing about? Is it Smokey or something
different?

> 
> 
> #include <gtk/gtk.h>
> 
> gboolean
> update_progressbar (GtkWidget *prog)
> {
>   static float frac = 0.0;
> 
>   frac += 0.01;
>   if (frac >= 1.0)
>     frac = 0.0;
>   
>   gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (prog), frac);
> 
>   return TRUE;
> }
> 
> int
> main (int argc, char** argv)
> {
>   GtkWidget *win, *prog;
>   
>   gtk_init (&argc, &argv);
> 
>   win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>   prog = gtk_progress_bar_new ();
>   gtk_window_set_default_size (GTK_WINDOW (win), 600, -1);
> 
>   gtk_container_add (GTK_CONTAINER (win), prog);
>   gtk_widget_show_all (win);
> 
>   g_timeout_add (5, (GSourceFunc) update_progressbar, prog);
>   
>   gtk_main ();
>   return 0;
> }
> 
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]