Signature
static stream_status_t dynamic_buffer_stream_close(void *backend)
Purpose
Release the backend resources owned by the dynamic_buffer_stream adapter.
Relationship to public port contract
- This is a private backend callback bound into the stream vtable.
- Its behavior is exercised through the public
stream_destroy() lifecycle API.
Preconditions
Invalid arguments
Success
- Releases any resource owned by the designated
dynamic_buffer_stream_t backend state.
- Releases the internal dynamic buffer storage owned by the backend, if any.
- Leaves no backend-owned dynamic-buffer storage live after the call returns.
Failure
Ownership
backend is borrowed by the callback.
- The callback releases only the resources owned by the backend state.
- The callback does not release the public
stream_t handle itself.
- Destruction of the public
stream_t handle remains the responsibility of the surrounding stream lifecycle logic.
Notes
- This callback is intended to be invoked by
stream_destroy(), not by borrower-facing read/write/flush operations.
- This callback performs backend cleanup only.
- It does not return a status code.
- This callback is not required to validate
backend.
- The exact cleanup is limited to resources owned by the
dynamic_buffer_stream backend implementation.