Re: GHashTable ref counting
- From: Tim Janik <timj imendio com>
- To: Murray Cumming <murrayc murrayc com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: GHashTable ref counting
- Date: Fri, 18 Nov 2005 14:23:35 +0100 (CET)
On Fri, 18 Nov 2005, Murray Cumming wrote:
3) implement hash table reference counting in GLib natively, also allowing
the use of hash tables as boxed types.
If this would only tend to be used internally, meaning that the API can be
a bit ugly, maybe you can implement some type of C reference-counting
smartpointer, so you can reference-count any boxed type.
i don't see a suitable solution for this.
note that moving reference counting into the hast table itself is
vital to allow the user to still use the g_hash_table_*() API with
the pointer returned by the boxed API.
but i'm of course be interested in hearing any clever new ideas regarding
smart pointer approaches in C or with libgobject. ;)
murrayc murrayc com
] [Thread Prev