GLib.VariantBuilder.new
function new(type: GLib.VariantType): GLib.VariantBuilder { // Gjs wrapper for g_variant_builder_new() }
Allocates and initialises a new GLib.VariantBuilder.
You should call GLib.VariantBuilder.prototype.unref on the return value when it is no longer needed. The memory will not be automatically freed by any other call.
In most cases it is easier to place a GLib.VariantBuilder directly on the stack of the calling function and initialise it with GLib.VariantBuilder.init.
Since 2.24
- type
a container type
- Returns