Skip to content

Declared in <galanthus/c_api/gln_capi.h>.

GLN_API void GLN_CALL gln_release_buffer(void* in_buffer);
  • Family: Destroy and release functions
  • Return type: void

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.

TypeNullabilityOwnership
voidvaluevalue

Parameters

NameDirectionTypeNullabilityOwnership
in_bufferinputvoid*nonnullborrowed

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.

See Also