GValue string memory management
- From: Charles Schmidt <cschmidt2 emich edu>
- To: gtk-app-devel-list gnome org
- Subject: GValue string memory management
- Date: Sat, 14 Aug 2004 21:35:24 -0400
-
when a GValue is holding a string (set by g_value_take_string(), which
tells the GValue to take over the responsibility of freeing the string),
is there a way to tell it to give up ownership? Something like a
g_value_give_string() which returns the string and then tells the GValue
that it is no longer responsible for freeing the string (like, it thinks
its a static string?)
Alternatively, how would I just hack such a function up? I'm going to
destroy the GValue right after I give up the string, so the GValue
doesn't need to be usable after wards. I could just use
g_value_get_string(), and then tell the GValue someway to *not* free the
string when I use g_value_unset().
-Thanks
charlie
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]