Best way to free a gslist



Hi,

what is the best way to free completely a generic gslist?

Example: a list of n elements, with a single element generated from a
struct like this:

struct
{
gchar *data1;
gchar *data2;
guint a;
gboolean b;
...
double z;
}

Using GAllocator? or using g_free() for every element (and sub-element
like gchar* for example). Eventually can you show me a sample code?

Thanks,
Giulio



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