Re: Problem with GValue
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: Maciej Piechotka <uzytkownik2 gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Problem with GValue
- Date: Fri, 17 Feb 2006 15:22:54 -0500
Maciej Piechotka wrote:
On 2/17/06, Fernando ApesteguÃa <fernando apesteguia gmail com> wrote:
Sorry if this is so trivial...
Did you try to g_free it?
Best regards!
Sorry. I didn't understand g_value_init function. Sorry.
Wait... hold your horses ! ;-)
If a GValue has been g_value_set_* () in its lifetime at least once; it
must be
g_value_unset () sometime after.
Although not doing so may not be a memory leak for most cases;
a G_TYPE_STRING for example will hold a copy of the string on the GValue,
this will only be freed with g_value_unset().
Its also common practice to just use a GValue on the stack and save
yourself a g_free.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]