Re: g_list_free(...) doesn't assign null



On Wed, 25 Jul 2001, Miguel A. Figueroa-Villanueva wrote:

> Hi
>
> 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?

The g_list_free function can't change what the list variable in the
calling function points to.  So what you suggest isn't possible in C,
which is why it doesn't do that.

James.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]