GALANTHUS / ABI FUNCTION REFERENCE
gln_release_buffer
Declared in <galanthus/c_api/gln_capi.h>.
GLN_API void GLN_CALL gln_release_buffer(void* in_buffer);
Purpose
Releases a caller-owned opaque buffer whose ownership was transferred out of the Galanthus C ABI.
The buffer data remains valid until this function releases it. After release, the allocation and every pointer into it are invalid; the caller's pointer variable is not cleared.
Return
Returns no value.
| Type | Nullability | Ownership |
|---|---|---|
void | value | value |
Parameters
| Name | Direction | Type | Nullability | Ownership |
|---|---|---|---|---|
in_buffer | input | void* | nonnull | borrowed |
Notes
Passing NULL for in_buffer is allowed and has no effect.
Use this for void* or byte-buffer outputs whose producing API documents transferred ownership to the caller. Caller-owned strings returned as char* use gln_release_string.
Buffer-producing callback interfaces document their matching release callback with the callback table.