Re: Memory question
- From: David Rosal <david rosal upf edu>
- To: Colossus <colossus 3000 it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Memory question
- Date: Wed, 28 Sep 2005 10:58:29 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]