GtkCList memory management



Hi,

Im developing an application using gtk+1.2.10-10 and I have problems trying to free
the memory used by the GtkCList. I been using gtk+/gnome development environment
just for some weeks, so Im not even sure about the use of the GtkCList functions.
The way I use the API is:

...
/* Add rows to the CList */
gtk_clist_append (GtkCList *clist, gchar *text[]); 
...
/* Change text of one cell */
gtk_clist_set_tex (GtkCList *clist, gint row, gint column, const gchar *text);
...
/* Clear the entire CList */
gtk_clist_clear ((tkCList *clist);
...

The problem is that gtk_clist_clear doesnt free the memory. Ive looked the source
of the library (gtkclist.c) and the way it does the clean is using the function 
g_mem_chunk_free. I made a little program with the functions of the GMemChunk API, 
and that function seems not to free the memory, just takes out an atom. I had to use
g_mem_chunk_reset after g_mem_chunk_free to free the memory properly. Just guessing
if this could be a problem.

Ive looked some code that uses GtkCList (Evolution), and it seems it uses the 
library same way. I would like to know if Im using the GtkClists properly. Any help 
would be appreciated.

Thanks in advance.

Greetings.




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