Re: [off-topic Q]
- From: Peter Bloomfield <PeterBloomfield MindSpring com>
- To: balsa-list gnome org
- Subject: Re: [off-topic Q]
- Date: Mon, 28 Jan 2002 12:34:47 -0500
On 2002.01.28 07:00 Emmanuel wrote:
> Hi all,
> I saw that we changed a lot of calls to g_list_free to g_list_free_1.
> Could someone explain to me the difference (I looked to glib sources
> but
> that is still not very clear to me).
> Thanks
> Bye
> Manu
g_list_free is for freeing an entire list, and may involve a loop,
whereas g_list_free_1 is for freeing a single GList element. When the
element has been cut from a list with g_list_remove_link, it's
desirable to free it, and IMHO it's more transparent to use
g_list_free_1 than g_list_free. That's all.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]