VariantBuilder.clear

Releases all memory associated with a #GVariantBuilder without freeing the #GVariantBuilder structure itself.

It typically only makes sense to do this on a stack-allocated #GVariantBuilder if you want to abort building the value part-way through. This function need not be called if you call g_variant_builder_end() and it also doesn't need to be called on builders allocated with g_variant_builder_new() (see g_variant_builder_unref() for that).

This function leaves the #GVariantBuilder structure set to all-zeros. It is valid to call this function on either an initialised #GVariantBuilder or one that is set to all-zeros but it is not valid to call this function on uninitialised memory.

class VariantBuilder
void
clear
()

Meta

Since

2.24