g_free notwendig?

O

oxcinsha

Mitglied
Hi,...

...kurze Frage, weil ich mir nicht sicher bin:

Code:
int error_message ( GtkWidget *parent , gchar *text ) {

	gchar *message = g_locale_to_utf8 ( text , strlen ( text ) , NULL , NULL , NULL );
	GtkDialog *dialog = (GtkDialog *) gtk_message_dialog_new ( GTK_IS_WINDOW ( parent ) ? GTK_WINDOW ( parent ) : NULL , GTK_DIALOG_DESTROY_WITH_PARENT , GTK_MESSAGE_ERROR ,  GTK_BUTTONS_OK , message );
	gtk_dialog_run ( dialog );
	gtk_widget_destroy ( dialog );

}

Aehm...den String hinter dem Stringpointer "message" allocated von g_locale_to_utf8 sollte man wohl mit g_free() wieder freigeben, oder?

Wird das normal nicht automatisch gemacht wenn der Thread die Function verlaesst?
 

Ähnliche Themen

[PHP] Autologin-Funktion

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

NagiosGrapher 1.7.1 funktioniert nicht

Ubuntu X / dbus problem

Modulfehler?

Zurück
Oben