2012/3/2, Gaetano Guerriero <gaetano.guerri...@spacespa.it>:
> Greetings,
> this code leaks memory on Windows XP until the program crashes after some
> minutes:
> =======================
> #include "gtk/gtk.h"
>
> static gboolean progressbar_pulse(gpointer data) {
>     gtk_progress_bar_pulse(GTK_PROGRESS_BAR(data));
>     return TRUE;
> }
>
> int main(int argc, char *argv[]) {
>     GtkWidget *window, *progressbar;
>
>     gtk_init(&argc, &argv);
>     window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
>     progressbar = gtk_progress_bar_new();
>     gtk_container_add(GTK_CONTAINER(window), progressbar);
>     gtk_widget_show_all(window);
>     g_timeout_add(50, progressbar_pulse, progressbar);
>     gtk_main();
>
>     return 0;
> }
> =======================
>
> The error after the crash:
> ======================
> (leak.exe:2420): Gdk-WARNING **: gdkgc-win32.c:830: SaveDC failed: Memoria
> insufficiente per eseguire il comando.
>
> (leak.exe:2420): Gdk-WARNING **: gdkgc-win32.c:970: RestoreDC failed:
> Parametro non corretto.
>
> (leak.exe:2420): Gdk-WARNING **: gdkpixmap-win32.c:279: CreateDIBSection
> failed: Parametro non corretto.
> **
> Gdk:ERROR:gdkdrawable-win32.c:2040:_gdk_win32_drawable_finish: assertion
> failed: (impl->hdc_count == 0)
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> ======================
>
>
> I'm using "all-in-on bundle" for windows 2.24.10-20120208_win32 from gtk.org
> website, and I compile with MinGW.
>
> Any suggestions ?
>
> Gaetano
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>


Hi Gaetano,
you are right - this application steals memory.
I compiled it by mingw g++ with gtk+-bundle_2.24.10-20120208_win32.zip.
About 8 kByte per second for WinXP.

Best regards,

Igor
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to