CK_RHS_DESTROY(3)

πŸ’– ck_rhs_destroy(3) β€” destroy hash set πŸ’–

okay bestie, so this is a page from the Concurrency Kit manual, aka libck, and you link against it with -lck. It's the one about destroying a hash set. Not "delete one lil thing" β€” we're talking full teardown, the whole thing, gone. πŸ’…


✨ SYNOPSIS ✨

#include <ck_rhs.h>

void
ck_rhs_destroy(ck_rhs_t *hs);

like, that's it. one function, one pointer, zero drama. πŸŽ€


🌸 DESCRIPTION 🌸

So ck_rhs_destroy(3) goes and asks the underlying allocator β€” the exact one you specified when you set things up with ck_rhs_init(3) β€” to immediately destroy the object that hs points at. Immediately. No waiting around, no "in a sec", it's giving instant. πŸ’€

⚠️ BIG ONE, no cap: the user must guarantee that no threads are accessing the object pointed to by hs when ck_rhs_destroy(3) is called. Like, that's on you. If some other thread is still poking at it while you're destroying it, that's not the function's problem, that's a you problem, and it's gonna be a bad time. 😭

πŸ¦‹ RETURN VALUES πŸ¦‹

ck_rhs_destroy(3) has no return value. It returns nothing. Void. Empty. It simply does the thing and dips. ✨


πŸŽ€ ERRORS πŸŽ€

This function is guaranteed not to fail. Periodt. πŸ‘‘


🌈 SEE ALSO 🌈

the whole squad, fr fr:

More info is available at http://concurrencykit.org/ β€” go look, iykyk 🫢


and that's the whole page, bestie πŸ’œ this lil gem comes to you from the Concurrency Kit crew, dated September 17, 2012, and the manual page itself is CK_RHS_DESTROY(3). slay, go free your memory responsibly πŸŒΈπŸ’–

πŸ“¦ where this page comes from