LIBMAWK_CELL_DESTROY(3libmawk)

πŸ’– LIBMAWK_CELL_DESTROY πŸ’–

okay bestie, welcome to the libmawk manual ✨ this one's a little one but it's so important, trust.


✨ NAME ✨

libmawk_cell_destroy β€” free all memory associated with a cell πŸ§ΉπŸ’…


🌸 SYNOPSIS 🌸

#include <libmawk.h>

void libmawk_cell_destroy(mawk_state_t *m, CELL *c);

πŸ¦‹ DESCRIPTION πŸ¦‹

so, libmawk_cell_destroy() does exactly what it says on the tin: it frees all memory allocated to store a mawk cell. no cap, that's the whole gig. πŸ’–

it's giving cleanup era, and it is lowkey essential when you're working with some of the libmawk calls that hand you back a newly allocated cell β€” the prime example being the libmawk_call_function() call. like, that function gives you a cell, and somebody's gotta let it go, and that somebody is you. 🫢

the argument m is a libmawk context, and it's the same one you got back earlier from either libmawk_initialize() or libmawk_initialize_stage3(). so if you initialized it, you already have it β€” go off, you're prepared. πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘


fr fr, don't forget to destroy your cells. memory leaks are not the vibe. πŸ˜­πŸ’€

libmawk Β· 2009-08-12 Β· LIBMAWK_CELL_DESTROY(3libmawk)

and that's the whole page, bestie β€” mwah, slay, periodt πŸ’…πŸŽ€πŸ¦‹βœ¨