Re: how to free GList



On Tuesday 12 September 2006 09:11, shibu Alampatta 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]);


Furthermore, the above code is wrong: g_list_append returns the new list head.

for(i=0;i<n;i++) glist = 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]