NET_Quit(3)

πŸ“¦
version 3.2.0 Β· 2 versions
, in fedora 43, fedora 44

NET_Quit πŸ’…βœ¨

okay bestie, so this is a page from the SDL_net3 manual β€” and we're talking about NET_Quit(3), the "we're so done here" function. πŸŽ€


✨ NAME ✨

NET_Quit β€” deinitialize the SDL_net library. yeah. the goodbye button. πŸ‘‹


🌸 SYNOPSIS 🌸

#include <SDL3_net/SDL_net.h>

void NET_Quit(void);

that's it. no args. no return value. she takes nothing and gives nothing back, iconic behavior honestly. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so you must call this when you're done with the library β€” like, probably at the end of your program, when you're packing up your little bags and heading out. 🧳✨

and here's the part that's lowkey so nice of her: it is safe to call this multiple times. she does not get mad. the library will only deinitialize once, and that happens when this function has been called the same number of times as NET_Init was successfully called. so the calls have to balance out, fr fr. it's giving very much "we go down together" energy. 😭🫢

and once you've successfully deinitialized the library? it is safe to call NET_Init again to reinitialize it for further use. she can come back. she always comes back. main character energy. πŸ‘‘πŸŒˆ


πŸ’œ THREAD SAFETY πŸ’œ

it is safe to call this function from any thread. no gatekeeping, no "sorry bestie this thread only" nonsense. every thread is welcome. 🫢✨


⭐ AVAILABILITY ⭐

this function is available since SDL_net 3.0.0. so if you're on anything older, no she is not there yet. πŸ™ˆ


🌈 SEE ALSO 🌈

  • NET_Init(3) β€” her other half, the one who actually starts everything. πŸ’ž

and that's the whole vibe check, bestie. go forth and clean up after yourself, your future self will be obsessed with you for it. πŸ’–βœ¨

lowkey reminder: the calls to NET_Init and NET_Quit have to match up, or she just sits there still initialized, waiting. don't do her like that. 😭

SDL_net manual, version SDL_net 3.2.0 β€” mwah, that's a wrap, slay, periodt. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from