IXP_FREESTAT(3)

πŸ“¦ version 0-unstable-2022-04, in nixos 26.05, nixpkgs unstable

πŸ’… ixp_freestat + ixp_freefcall: the libixp cleanup besties πŸ’…

okay bestie, this is the IXP_FREESTAT(3) page from the library functions manual β€” manual name folded in near the top, we move ✨. It’s giving β€œplease clean up your malloc(3) mess before you leave the group chat.”


✨ NAME ✨

ixp_freestat, ixp_freefcall β€” the cleanup duo, here to free the little guys inside your structs 🫢

🌸 SYNOPSIS 🌸

include the header first, obviously:

#include <ixp.h>

void ixp_freestat(IxpStat *s);

void ixp_freefcall(IxpFcall *fcall);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here’s the vibe: these functions free malloc(3) allocated data in the members of the passed structures and set those members to nil. That’s the whole slay. ✨

They do not free the structures themselves. Read that again, bestie: the struct itself stays; the stuff inside its members gets freed and nil’ed. No cap. πŸ’€

⚠️ key caveat: these functions do not free the structures themselves β€” just the malloc(3) allocated data in their members, and then those members become nil.

🌈 SEE ALSO 🌈

go read these next, iykyk:

mwah πŸ’‹ β€” this cutie came from the libixp Manual, dated 2012 Dec, page IXP_FREESTAT(3). byeee 🫢

πŸ“¦ where this page comes from