Colossus wrote:
Hi,

Am I doing the same ( memory leaking ) with g_strdup_printf ?
If so what is the better way to write the following code: ?

response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,
        g_strdup_printf ("%s",g_strerror(errno)) );
        return;

gchar *msg = g_strdup_printf("%s", g_strerror(errno));
response = ShowGtkMessageDialog(GTK_WINDOW(MainWindow), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, msg);
g_free(msg);
return;


Cheers,

~david
_______________________________________________
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