TTF_DestroyText(3)

πŸ’– TTF_DestroyText(3) πŸ’–

okay so bestie, welcome to the SDL_ttf3 FUNCTIONS corner of the manual, where today's main character is TTF_DestroyText. it's giving cleanup era ✨


✨ NAME ✨

TTF_DestroyText β€” destroy a text object created by a text engine. 🫢

basically: you made a text object, you loved it, you rendered it, and now we say goodbye. closure is self-care fr fr πŸ’…


🌸 HEADER FILE 🌸

defined in SDL3_ttf/SDL_ttf.h β€” that's the one, no cap πŸ“Œ


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "SDL3_ttf/SDL_ttf.h"

void TTF_DestroyText(TTF_Text *text);

look at her. one function, one pointer, zero drama. iconic πŸ‘‘


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • text β€” the text to destroy. like, the actual text object you want gone. poof. πŸͺ„

πŸ’œ THREAD SAFETY πŸ’œ

⚠️ this function should be called on the thread that created the text. not a different thread, not your friend's thread, not the thread you met at a party once. the same one. periodt πŸ’€

🌈 AVAILABILITY 🌈

this function is available since SDL_ttf 3.0.0. she's been here. she's a veteran. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

like, obviously go read TTF_CreateText(3) β€” you can't destroy what you never created, iykyk 🧚


and that's the whole page, bestie!! no notes, ate, left zero crumbs. this little writeup is chillin' in SDL_ttf 3.2.2, so if you see that version number floatin' around, that's just her signature πŸŽ€ bye ily, go free your memory πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from