attractivechaos / klib

A standalone and lightweight C library
http://attractivechaos.github.io/klib/
MIT License
4.18k stars 556 forks source link

khash: factor out kh_release_* #107

Open rscharfe opened 6 years ago

rscharfe commented 6 years ago

Add a function for releasing only the internal memory of the khash structure, but not the structure itself. This allows keeping that struct on the stack instead of allocating it using khinit*.

larseggert commented 5 years ago

Needs a kh_release() macro added, otherwise a great addition

rscharfe commented 2 years ago

kh_release() added, patch amended.