GLib mistakes?



Hi everybody!

GLib is great but I think I have found few mistakes in GCaches.

First, when programmer calls g_cache_destroy(), it doesn't 
deallocate "cache nodes" (in "cache nodes" are saved reference 
counts). GLib user has no way how to free it when he destroys not 
empty cache.
 
Second, for what is there function "g_cache_value_foreach()"? I 
think, it only confuses users. What are the parameters of 
function func (the second argument of g_cache_value_foreach)? 
Answer: as "hash-key" are passed shared values and as "hash-
value" are passed internal "cache node" structs. User mustn't do 
anything with it. I think it is all non-sense.

Am I right or not? Please answer me!
 
Greetings by Michal Burda



K chatování je tu http://www.XChat.cz
Založte si svůj mail na http://mail.centrum.cz




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