transfer annotation describes who owns the arguments or return values. It’s not a matter of what type you’re using, but how the ownership of the argument or return value can be described to callers, and, in essence, how you expect the memory management of those types to work.
container annotation, which does not apply in your case, you have two options:
none means that the ownership is not transfered; in other words: the return value is owned by the callee—the function owns the return value and is responsible for releasing its resources. An example is
gtk_entry_get_buffer(): the returned
GtkEntryBuffer instance is owned by the
GtkEntry instance, and the getter function merely returns a pointer to it. The ownership of the
GtkEntryBuffer is not transferred from the callee to the caller.
full is the opposite of
none: the ownership of the returned value is transferred from the callee to the caller. A typical case is a singleton constructor that caches its result, but returns a new reference with every invocation, like
If you’re returning a real reference to a
GSubprocess and thus you expect the caller to call
g_object_unref() on it once they are done, you should use
transfer full; if you’re returning a simple pointer to a
GSubprocess and thus you expect the caller to never call
g_object_unref() on it, then use
You can check the documentation for the introspection annotations.