[ CCode ( cprefix = "SOUP_MEMORY_" , type_id = "soup_memory_use_get_type ()" ) ]
public enum MemoryUse
Describes how Buffer should use the data passed in by the caller.
See also Buffer.with_owner, which allows to you create a
buffer containing data which is owned by another object.
- COPY - The passed-in data belongs to the
caller; the Buffer will copy it into new memory, leaving the caller free to reuse
the original memory.
- STATIC - The memory is statically
allocated and constant; libsoup can use the passed-in buffer directly and not need to worry about it being modified or freed.
- TAKE - The caller has allocated the
memory for the Buffer's use; libsoup will assume ownership of it and free it (with
g_free) when it is done with it.
- TEMPORARY - The passed-in data
belongs to the caller, but will remain valid for the lifetime of the Buffer.