Re: Freeing GtkListStore entries.
- From: Martyn Russell <ginxd btopenworld com>
- To: Harring Figueiredo <harringf yahoo com>
- Cc: gtk_list gtk gtk <gtk-app-devel-list gnome org>, glade users <glade-users ximian com>
- Subject: Re: Freeing GtkListStore entries.
- Date: 09 Oct 2002 20:01:48 +0100
On Wed, 2002-10-09 at 15:01, Harring Figueiredo wrote:
Folks,
I would like to know if we have to free the items from a GtkListStore when
they are overwrtten with new values.
You are responsible for all memory you create and all memory you request
from gtk (i.e. gtk_tree_model_get(...)). When you pass a chunk of
memory to gtk (eg a gchar*) gtk takes a copy. You then must free your
copy.
I have the following:
gtk_list_store_set (store, &iter,
COL_DOC_ID, req->doc_id,
COL_PAT_ID, req->pat_id, -1);
They are both of type char*. Later on, that record can be updated with new
value, so do I have to free them first before setting the new values ?
What about for pixbufs, should they be freed as well ? ( Aparently the set
call makes a copy of whatever we pass in.)
I looked at the source code, and to be quite honest, I got a bit dizzy with
the vargs and all the other function calls. That's why I am asking here :)
Thanks.
Harring.
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]