Re: GSList and g_filename_from_uri free memory problem



David Necas (Yeti) wrote:

You have to free it yourself before freeing the list or
individual elements.

I did it with g_free (filename) but when I use g_print (gslist->data)
I get corrupted results.

GSList can store some untyped pointers.  It has no idea of
what they point to (or if they are real pointers at all),
therefore it cannot make copies of the data, cannot free
them, etc.  It just stores some untyped pointers.

So how to solve the problem ?
--
Colossus
Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.sourceforge.net
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net



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