Re: GHashTable ref counting



On Fri, 18 Nov 2005, Dave Benson wrote:

On Fri, Nov 18, 2005 at 02:12:26PM +0100, Tim Janik wrote:
3) implement hash table reference counting in GLib natively, also allowing
   the use of hash tables as boxed types.

to use this, one might want finalization notification on the hash-table
itself -- some hashtables don't properly own their data.
(although i hate to see the size of GHashTable bloat too much...)

if a hash table is used without data destzruction functions, the owner of the
data should make sure to g_hash_table_destroy() the table if it's not needed
anymore. no finalization notification from the side of the hash table is
required for that though.

also, are you planning on doing the same to GTree?

not currently. we're not on a vendetta to make everything
glib ref-countable at once ;)
we rather adress issues as the need arises.


- dave


---
ciaoTJ



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