O
oxcinsha
Mitglied
Hi,...
...kurze Frage, weil ich mir nicht sicher bin:
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?
...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?