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 thathspoints to when you callck_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:
ck_hs_init(3)ck_hs_move(3)CK_HS_HASH(3)ck_hs_iterator_init(3)ck_hs_next(3)ck_hs_get(3)ck_hs_put(3)ck_hs_put_unique(3)ck_hs_set(3)ck_hs_fas(3)ck_hs_remove(3)ck_hs_grow(3)ck_hs_rebuild(3)ck_hs_gc(3)ck_hs_count(3)ck_hs_reset(3)ck_hs_reset_size(3)ck_hs_stat(3)
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
- alpine 3.24: ck-doc 0.7.2-r1 Β· BSD-2-Clause AND Apache-2.0
- debian bookworm: libck-dev 0.7.1-10 Β· BSD-2-Clause
- debian trixie: libck-dev 0.7.2-6 Β· BSD-2-Clause
- epel 10: ck-devel 0.7.2-1.el10_1 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- epel 9: ck-devel 0.7.0-10.el9 Β· BSD
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- nixos 26.05: ck 0.7.2
- nixpkgs unstable: ck 0.7.2
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- ubuntu jammy: libck-dev 0.7.1-6ubuntu2 Β· BSD-2-Clause
- ubuntu noble: libck-dev 0.7.1-13build1 Β· BSD-2-Clause
- ubuntu questing: libck-dev 0.7.2-5ubuntu1
- ubuntu resolute: libck-dev 0.7.2-5ubuntu2 Β· BSD-2-Clause
- ubuntu stonking: libck-dev 0.7.2-11 Β· BSD-2-Clause
- Copyright 2012-2013 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms