CK_HS_DESTROY(3)

πŸ’– CK_HS_DESTROY(3) β€” ck_hs_destroy πŸ’–

okay bestie, welcome to the manual page for ck_hs_destroy(3), the little function that says bye-bye to your hash set 🫢 it lives in Concurrency Kit (that's libck, link it with -lck) and it is genuinely one of the most low-stakes functions in the whole library, so let's get into it ✨


🌸 SYNOPSIS 🌸

#include <ck_hs.h>

void
ck_hs_destroy(ck_hs_t *hs);

like, that's it. one include, one call, no return value, no drama. iconic behavior honestly πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so ck_hs_destroy(3) is the cleanup queen πŸ’… it asks the underlying allocator β€” the one you specified when you called ck_hs_init(3) β€” to immediately destroy the object that hs points at. like, right now. no waiting, no vibes, no grace period.

⚠️ and here's the part where you need to pay attention, bestie: you have to guarantee that no threads are accessing the object that hs points to when you call ck_hs_destroy(3). that's on you, not on the function. no cap. if somebody's still touching that memory when you nuke it, that's a you problem 😭

so the energy is basically: everyone out of the pool, then pull the plug πŸŠβ™€οΈπŸ’€


✨ RETURN VALUES ✨

ck_hs_destroy(3) has no return value. it's void. it gives you nothing back and honestly? it doesn't need to. it's giving "I did the thing, you're welcome" πŸŽ€


🌈 ERRORS 🌈

this function is guaranteed not to fail. fr fr. no error codes, no errno situation, no cryptic little number to go look up at 2am. it just does the thing. slay 🌟


πŸ‘‘ SEE ALSO πŸ‘‘

the whole hash set friend group, go read them all:

more info is available at http://concurrencykit.org/ 🧚


and that's the whole page, bestie!! this one was dated September 17, 2012 and it comes to you courtesy of Concurrency Kit. go forth and destroy responsibly, mwah πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from