Re: simple question: are const gchar* arguments hold as copies internally?
- From: Andreas Stricker <andreas stricker fela ch>
- To: gtk-app-devel-list gnome org
- Subject: Re: simple question: are const gchar* arguments hold as copies internally?
- Date: Mon, 05 Sep 2005 10:22:34 +0200
these two functions take const gchar pointers:
void gtk_label_set_text([...] const gchar *str);
void g_key_file_set_value([...] const gchar *group_name, [...])
Does that mean that the arguments are *not* hold as copies internally
so that I have to care for the allocated memory -- or can I savely pass
a temporary character string as an argument to the functions which make
a copy of the strings internally and also release their memory when
necessary automatically?
The strings are saved as copies internal. You can savely pass a
temporary string.
Cheers,
Andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]