Re: g_list_free(...) doesn't assign null
- From: Havoc Pennington <hp redhat com>
- To: "Miguel A. Figueroa-Villanueva" <miguelf msu edu>
- Cc: gtk-devel-list gnome org
- Subject: Re: g_list_free(...) doesn't assign null
- Date: 26 Jul 2001 01:05:49 -0400
"Miguel A. Figueroa-Villanueva" <miguelf msu edu> writes:
>
> Is there any particular reason why it wouldn't be good to assign a
> list to NULL after you have freed it?? I can't see any reason why
> g_list_free(GList *list) wouldn't assign it (list = NULL) after it has
> been freed. Is this a bug?
It can't assign it to NULL, since it takes the GList* by value - it
would have to be g_list_free (GList **list) to make NULL-assignment
possible. And changing that now would be backward-incompatible, if
nothing else.
> I am new to glib/gtk and to the open-source mailing list system in
> general... so I would appreciate some redirection if I am using this
> list for something other than it's purpose.
This list is for discussing development of GTK itself, so your
question is on-topic. If you have questions about using GTK, rather
than modifications to GTK itself, you should post to
gtk-list gnome org But this question was fine for this list.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]