Re: how to free GList
- From: "Yash Kumar Gupta" <ygupta gmail com>
- To: "shibu Alampatta" <mail2thegreat gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to free GList
- Date: Tue, 12 Sep 2006 17:43:18 +0530
Use g_list_foreach() to free the data associcated with each node. In second
argument here, you need to supply a GFunc which will free the data
associated with each node.
Then use g_list_free to free the head of the list.
-Yash
On 9/12/06, shibu Alampatta <mail2thegreat gmail com> wrote:
Hi all,
Pls see the below code structure. how to free the glist at the indicated
place?
GList * glist=NULL;
for(i=0;i<n;i++) g_list_append(glist,a[i]);
....
// some processing
....
//here want to free the glist
Thks in advance..
Shibu
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]