![]() |
jsocketpp 1.0
A cross-platform C++20 socket library.
|
Custom deleter for addrinfo* pointers to support RAII-style cleanup. More...
#include <common.hpp>
Public Member Functions | |
| void | operator() (addrinfo *p) const noexcept |
| Deletes an addrinfo* by calling freeaddrinfo(). | |
Custom deleter for addrinfo* pointers to support RAII-style cleanup.
This deleter is intended for use with std::unique_ptr<addrinfo, AddrinfoDeleter>, enabling automatic cleanup of dynamically allocated addrinfo structures returned by getaddrinfo(). When the smart pointer goes out of scope, freeaddrinfo() will be called automatically to release associated memory.
|
inlinenoexcept |
Deletes an addrinfo* by calling freeaddrinfo().
| [in] | p | Pointer to an addrinfo structure to be deallocated. |