NET_FreeLocalAddresses(3)
π NET_FreeLocalAddresses(3) π
okay bestie, welcome to the SDL_net3 section of the manual β yes that's the manual name, we're in the SDL_net3 FUNCTIONS zone, stay with me π«Ά
β¨ NAME β¨
NET_FreeLocalAddresses β the lil cleanup crew that frees the results you got from NET_GetLocalAddresses.
πΈ SYNOPSIS πΈ
#include <SDL3_net/SDL_net.h>
void NET_FreeLocalAddresses(NET_Address **addresses);
π DESCRIPTION π
so basically, this function unrefs every address in the array and then frees the array itself. two-for-one. ate. π
here's the cute part: addresses are reference counted, so it is totally safe to keep any addresses you want from this array even after you call this function β as long as you called NET_RefAddress() on them first. like, grab your faves, ref them, then let the array go. no cap. β¨
and it is safe to pass a NULL in here β it will just be ignored. no drama, no crash, iconic behaviour honestly. π¦
π§ FUNCTION PARAMETERS π§
addressesβ a pointer that was returned byNET_GetLocalAddresses(). yes, that exact one. don't be out here making up your own. π
π₯ THREAD SAFETY π₯
it is safe to call this function from any thread. literally any of them. go wild. π
π AVAILABILITY π
this function has been available since SDL_net 3.0.0. vintage but make it fresh. π
not me ending the page without a single warning section because there isn't one π the whole thing is just safe. we love a low-stress free function fr fr. π
kisses, this has been your girl from the SDL_net era β the docs are stamped SDL_net 3.2.0, so if your version is giving something older, that's a whole different vibe check. bye bestie, go free those addresses responsibly πβ¨π
π¦ where this page comes from
- fedora 43: SDL3_net-devel 3.2.0-2.fc43 Β· Zlib
- fedora 43: SDL3_net-devel 3.2.0-2.fc43 Β· Zlib
- fedora 44: SDL3_net-devel 3.2.0-2.fc44 Β· Zlib
- fedora 44: SDL3_net-devel 3.2.0-2.fc44 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms