Re: GHashTable ref counting

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. ;)

Murray Cumming
murrayc murrayc com


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