TICKIT_RENDERBUFFER_REF(3)

πŸ’… TICKIT_RENDERBUFFER_REF(3) β€” bestie edition

okay so welcome to the Library Functions Manual, section 3, and today's episode is all about tickit_renderbuffer_ref and tickit_renderbuffer_unref β€” the two functions that keep track of how many people are holding onto your render buffer. it's giving ✨reference counting✨ and honestly? iconic. πŸŽ€


🌸 NAME 🌸

tickit_renderbuffer_ref, tickit_renderbuffer_unref β€” adjust the refcount of a render buffer, aka the lil counter that decides whether your render buffer lives or gets yeeted into the void πŸ’€


✨ SYNOPSIS ✨

#include <tickit.h>

TickitRenderBuffer *tickit_renderbuffer_ref(TickitRenderBuffer *rb);
void tickit_renderbuffer_unref(TickitRenderBuffer *rb);

Link with -ltickit.

fr fr do not forget the -ltickit, bestie, the linker will simply Not Know Her 😭

πŸ’– DESCRIPTION πŸ’–

okay so tickit_renderbuffer_ref() increments the stored refcount of the given render buffer instance by one. one! that's it! and then β€” this is the cute part β€” it returns the pointer argument itself, so it's useful for chaining. like, you can just keep going. slay. πŸ’…

tickit_renderbuffer_unref() decrements the stored refcount of the given render buffer instance by one. and if the refcount drops to zero, the instance is destroyed. gone. not me crying over a struct 🫢 when that happens, it will release any resources controlled by it β€” so everything it was holding onto gets cleaned up too. very responsible of her, no cap. ✨


πŸ¦‹ RETURN VALUE πŸ¦‹

  • tickit_renderbuffer_ref() returns a render buffer instance pointer. that pointer. the one you gave it. it's giving boomerang πŸͺƒ
  • tickit_renderbuffer_unref() returns no value. nothing. void. silence. 😌

🌈 SEE ALSO 🌈

go read those too, iykyk πŸ“š


and that's the whole page, bestie! this was TICKIT_RENDERBUFFER_REF(3) from the Library Functions Manual, and it ate. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ