GALANTHUS / ABI FUNCTION REFERENCE
gln_release_error
Declared in <galanthus/c_api/gln_capi.h>.
GLN_API void GLN_CALL gln_release_error(gln_error_t* in_error);
Purpose
Releases dynamic content stored in a caller-allocated gln_error_t object.
The call frees and clears issue_type, message, details, and the structured detail handle stored in the error slot.
Return
Returns no value.
| Type | Nullability | Ownership |
|---|---|---|
void | value | value |
Parameters
| Name | Direction | Type | Nullability | Ownership |
|---|---|---|---|---|
in_error | input | gln_error_t* | nullable | releases_dynamic_content |
Notes
Calling gln_release_error invalidates any structured detail handle returned by gln_get_error_detail for the same gln_error_t, including all const char* fields borrowed from that detail.
After release, the dynamic fields in in_error are reset to NULL. Passing NULL for in_error is allowed and has no effect.
Use this only for caller-owned error slots passed to functions such as gln_init_runtime or backend-open calls. Errors returned by gln_get_backend_result_error are borrowed from the result envelope and are released by gln_destroy_backend_result.