Cache.this

Warning g_cache_new has been deprecated since version 2.32 and should not be used in newly-written code. Use a GHashTable instead Creates a new GCache.

  1. this(GCache* gCache)
  2. this(GCacheNewFunc valueNewFunc, GCacheDestroyFunc valueDestroyFunc, GCacheDupFunc keyDupFunc, GCacheDestroyFunc keyDestroyFunc, GHashFunc hashKeyFunc, GHashFunc hashValueFunc, GEqualFunc keyEqualFunc)

Parameters

valueNewFunc GCacheNewFunc

a function to create a new object given a key. This is called by g_cache_insert() if an object with the given key does not already exist

valueDestroyFunc GCacheDestroyFunc

a function to destroy an object. It is called by g_cache_remove() when the object is no longer needed (i.e. its reference count drops to 0)

keyDupFunc GCacheDupFunc

a function to copy a key. It is called by g_cache_insert() if the key does not already exist in the GCache

keyDestroyFunc GCacheDestroyFunc

a function to destroy a key. It is called by g_cache_remove() when the object is no longer needed (i.e. its reference count drops to 0)

hashKeyFunc GHashFunc

a function to create a hash value from a key

hashValueFunc GHashFunc

a function to create a hash value from a value

keyEqualFunc GEqualFunc

a function to compare two keys. It should return TRUE if the two keys are equivalent

Throws

ConstructionException GTK+ fails to create the object.

Meta