FcPatternDestroy(3)

πŸ’… FcPatternDestroy(3) β€” the fontconfig manual, but make it cute

okay so this is FcPatternDestroy(3) from the fontconfig section 3 girlypops β€” i.e. library calls, not commands. she's short, she's iconic, she's the cleanup queen πŸ‘‘


✨ NAME ✨

FcPatternDestroy β€” destroy a pattern πŸ’€πŸŒΈ

like, literally, she ends it. respectfully.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fontconfig/fontconfig.h>

void FcPatternDestroy (FcPattern *p);

no cap, that's the whole vibe check β€” one include, one function, one pointer πŸŽ€


πŸ’– DESCRIPTION πŸ’–

okay bestie, listen, this is important: FcPatternDestroy decrements the pattern reference count πŸ‘ not "frees it immediately", not "yeets it into the void" β€” it decrements the reference count. the way that distinction matters 😭

so it's like this:

  • there's a count of how many references exist to the pattern p
  • this function takes that count down by one
  • if all references are gone, then it destroys the pattern 🫢
  • and in the process of destroying the pattern, it also destroys all related values β€” every last one, no leftovers, we love a thorough queen ✨

so if other people still have references? she just politely steps back πŸ’… the pattern lives on, main character energy, until the last ref dips.

the return type is void, because she doesn't do receipts β€” no return value, no status, nothing to check. she just does the thing. periodt. πŸ”₯

⚠️ tiny caution bestie: this is a reference count situation, not a "call it and forget it" situation. calling it when you don't hold a reference is gonna have a bad time, iykyk πŸ™ˆ

🌈 that's it, that's the page 🌈

genuinely obsessed with how short this one is β€” she said "no bloat, only function." slay. πŸ¦‹πŸ’œ

this little love letter is from Fontconfig 2.17.0, dated 27 June 2025 β€” mwah, take care of your reference counts, ily πŸŽ€β­

πŸ“¦ where this page comes from