rhltable_free_and_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– rhltable_free_and_destroy(9) πŸ’–

okay so bestie, this is a page from the Kernel API Manual and tbh it's a short one but it's iconic β€” it's literally the cleanup queen of the rhashtable world. no cap, every table deserves a graceful exit ✨


✨ NAME ✨

rhltable_free_and_destroy β€” free elements and destroy a hash list table πŸŽ€

like, both jobs. at once. she's efficient.


πŸ¦‹ SYNOPSIS πŸ¦‹

void rhltable_free_and_destroy (struct rhltable *hlt , void
(*free_fn)(void *ptr, void *arg) , void *arg );

that's the whole vibe. three args, one void return, zero drama πŸ’…


🌸 ARGUMENTS 🌸

  • hlt β€” the hash list table we're about to destroy 🫢 this is the main character, the one getting taken down.
  • free_fn β€” the callback that releases the resources of an element πŸ’– you hand it a pointer to the contents, and it does the actual freeing. think of it as the designated cleanup bestie.
  • arg β€” a pointer that gets passed straight through to free_fn 🌈 whatever you want, it just travels along.

πŸ‘‘ DESCRIPTION πŸ‘‘

ok so real talk: this function frees the elements and destroys the hash list table, periodt πŸ”₯

and for the full lore β€” the actual nitty-gritty of how it behaves β€” you gotta go read the documentation for rhashtable_free_and_destroy. like, that's the source of truth, this one is just the rhltable flavoured sister πŸ’œ iykyk.


πŸ’€ SEE ALSO πŸ’€

the whole extended universe, fr fr β€” go check out the Kernel file ./include/linux/rhashtable.h and these iconic siblings:

like, that's a whole friend group 😭 go say hi.


ngl this page is short, but the vibe is immaculate. destroy responsibly, bestie πŸ“

and that's a wrap! 🌟 this little gem lives in ./include/linux and the version on deck is October 2026 β€” mwah, stan the kernel docs, they ate πŸ’…πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from