VariantDict.init

Initialises a glib.VariantDict structure.

If from_asv is given, it is used to initialise the dictionary.

This function completely ignores the previous contents of dict. On one hand this means that it is valid to pass in completely uninitialised memory. On the other hand, this means that if you are initialising over top of an existing glib.VariantDict you need to first call Variant.dictClear in order to avoid leaking memory.

You must not call Variant.dictRef or Variant.dictUnref on a glib.VariantDict that was initialised with this function. If you ever pass a reference to a glib.VariantDict outside of the control of your own code then you should assume that the person receiving that reference may try to use reference counting; you should use Variant.dictNew instead of this function.

class VariantDict
void
init

Parameters

fromAsv Variant

the initial value for dict

Meta

Since

2.40