Re: how to free GList
- From: "Vivien Malerba" <vmalerba 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 11:53:34 +0200
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
g_list_free (glist);
Note that this function will not free the memory pointed by each node.
If you have allocated memory, then you must free it first or risk some
memory leak.
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]