> This page is for version 5.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 5.0 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/5-0-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.6: https://docs.nvidia.com/holoscan/sdk-user-guide/4-6/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::channel_internal::close_local_subscriber

> Consume and retire one source-private subscriber owner.

```cpp showLineNumbers={false}
template <typename Subscriber>
expected<void, Error> holoscan::channel_internal::close_local_subscriber(
    std::unique_ptr<Subscriber> &subscriber
) noexcept
```

Consume and retire one source-private subscriber owner.

> **Note**
>
> Existing endpoint destruction remains the sole authority for staged and backend cleanup.

**Returns:** Success, ErrorCode::kClosed when already consumed, or a code-only cleanup error.

**Template parameters**

**`Subscriber`** `typename`

Concrete endpoint type derived from [WaitSetSubscriber](../classes/waitsetsubscriber).

---

**Parameters**

**`subscriber`** `std::unique_ptr<Subscriber> &`

Owning endpoint pointer; null on return, including after a retirement error.

---