GTypeInstance* g_type_create_instance ( GType type )
Creates and initializes an instance of
type is valid and
can be instantiated. The type system only performs basic allocation
and structure setups for instances: actual instance creation should
happen through functions supplied by the type’s fundamental type
implementation. So use of
g_type_create_instance() is reserved for
implementers of fundamental types only. E.g. instances of the
GObject hierarchy should be created via
g_object_new() and never
g_type_create_instance() which doesn’t handle things
like singleton objects or object construction.
The extended members of the returned instance are guaranteed to be filled with zeros.
Note: Do not use this function, unless you’re implementing a
fundamental type. Also language bindings should not use this
An instantiatable type to create an instance for.
An allocated and initialized instance, subject to further treatment by the fundamental type implementation.
|The data is owned by the called function.|