Problem with GValue
I'd like to destroy GValue. How should I do it? I cannot find any information about it. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Problem with GValue
Sorry if this is so trivial... Did you try to g_free it? Best regards! -- Forwarded message -- From: Maciej Piechotka [EMAIL PROTECTED] Date: 17-feb-2006 11:43 Subject: Problem with GValue To: Gtk Mailing list gtk-app-devel-list@gnome.org I'd like to destroy GValue. How should I do it? I cannot find any information about it. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Problem with GValue
Yes you need g_free, becouse when you create a GValue you use: g_new0 (GValue, 1) Where 1 is the number of GValues you whant to create (like an array); remember that GValue is just a C structure. 2006/2/17, Fernando Apesteguía [EMAIL PROTECTED]: Sorry if this is so trivial... Did you try to g_free it? Best regards! -- Forwarded message -- From: Maciej Piechotka [EMAIL PROTECTED] Date: 17-feb-2006 11:43 Subject: Problem with GValue To: Gtk Mailing list gtk-app-devel-list@gnome.org I'd like to destroy GValue. How should I do it? I cannot find any information about it. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list -- Trabajar, la mejor arma para tu superación de grano en grano, se hace la arena (R) (entrámite, pero para los cuates: LIBRE) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Problem with GValue
Maciej Piechotka wrote: On 2/17/06, Fernando ApesteguÃa [EMAIL PROTECTED] 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 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list