fcft_text_run_destroy(3)

✨ fcft_text_run_destroy(3) ✨

okay so bestie, this one's from the fcft manual (section 3, library calls only, we're fancy like that πŸ’…) and it's honestly the shortest little cleanup bop β€” but it MATTERS, so listen up πŸŽ€


🌸 NAME 🌸

fcft_text_run_destroy β€” free fcft_text_run objects. that's it. that's the whole job. she's a deleter and she's iconic for it πŸ—‘οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fcft/fcft.h>

void fcft_text_run_destroy(struct fcft_text_run *run);

literally just include the header and call her. one function, one pointer, zero drama 🫢


πŸ’– DESCRIPTION πŸ’–

so fcft_text_run_destroy() frees the fcft_text_run object run, which must have been created with fcft_text_run_rasterize() β€” no cap, that's the only legit origin story for this thing. don't just hand her any random pointer, she'll know πŸ‘€

important vibe check: the object has to actually come from fcft_text_run_rasterize(). that's not a suggestion, that's the rule fr fr.

and here's the good part β€” the one that makes everyone go "wait, really?" 😭 β€” it is totally ok to call fcft_destroy() on the font object that was used to rasterize the text-run, before freeing the text-run itself. so like, the font can dip out first, the text-run is fine, she's independent, she's got main character energy πŸ‘‘

the way this shakes out practically: applications may cache text-runs beyond the life time of the font object. yep. cache them, keep them around, let the font go β€” the text-run lives on 🌈

also, run may be NULL, in which case fcft_text_run_destroy() is a no-op. she just looks at it, says "nvm", and moves on. no crash, no tears, no problem πŸ’€πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

  • fcft_text_run_rasterize() β€” the one that makes the text-runs in the first place, iykyk

that's the whole page bestie!! short, sweet, and she ate πŸ“

cute little sign-off: this is from fcft 3.3.3, dated 2026-04-09, and yeah β€” that's the fcft_text_run_destroy(3) page, we're done here πŸ’œπŸ§š
πŸ“¦ where this page comes from