TICKIT_STRING_REF(3)

πŸ’– TICKIT_STRING_REF(3) πŸ’–

okay bestie, welcome to the Library Functions Manual page for tickit_string_ref, tickit_string_unref β€” the two lil functions that keep track of how many people are holding onto a counted string πŸŽ€


✨ NAME ✨

tickit_string_ref, tickit_string_unref β€” adjust the refcount of a counted string πŸ’…


🌸 SYNOPSIS 🌸

#include <tickit.h>

TickitString *tickit_string_ref(TickitString *s);
void tickit_string_unref(TickitString *s);

Link with -ltickit. πŸ”—


πŸ¦‹ DESCRIPTION πŸ¦‹

so tickit_string_ref() does the most iconic thing: it increments the stored refcount of the given counted string instance by one. by one, exactly one, no cap. and then β€” the serve β€” it returns the pointer argument itself, so you can chain it. main character behavior fr fr ✨

tickit_string_unref() is the opposite vibe: it decrements the stored refcount of the given counted string instance by one. and if the refcount drops to zero? 😭 the instance is destroyed. gone. no more. so like, don't be out here unref-ing stuff you still need, bestie, that's the whole game.


⭐ RETURN VALUE ⭐

  • tickit_string_ref() returns a counted string instance pointer 🫢
  • tickit_string_unref() returns no value. nothing. void. it's giving silence πŸ’€

🌈 SEE ALSO 🌈


and that's the page!! πŸ’œ this was TICKIT_STRING_REF(3), straight out of the Library Functions Manual β€” mwah, go forth and manage your refcounts responsibly, ily 🧚✨