Re: [gtk-list] Re: newbie g_list_remove prob
- From: "Timothy I. McGinnis" <tmcginnis synertechsystems com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: newbie g_list_remove prob
- Date: Thu, 5 Aug 1999 15:00:13 -0500
> - Are you assigning the return value of g_list_remove() to your
> list variable?
>
> - Are you thinking g_list_remove() is going to look at string
> contents? It doesn't know it's a string, it just knows
> about untyped pointers (gpointer, void*)
>
> Havoc
Ouch.
Yes, I assigned the return value back to my list variable.
Yes, I was thinking it compared contents. But then I assume a glist can
contain
anything, not just strings.
So then, I should not be freeing the malloc'ed variables I am appending to
my glist, correct? Because the glist is storing only the pointer and if I
free the malloc'ed variable the pointer will not be valid any longer.
I beg your forgiveness for these simpleton questions.
Tim M.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]