Skip to content

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

GLN_API void GLN_CALL gln_release_error(gln_error_t* in_error);
  • Family: Destroy and release functions
  • Return type: void

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.

TypeNullabilityOwnership
voidvaluevalue

Parameters

NameDirectionTypeNullabilityOwnership
in_errorinputgln_error_t*nullablereleases_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.

See Also