TTF_DESTROYSURFACETEXTENGINE(3)

πŸ’– NAME πŸ’–

TTF_DestroySurfaceTextEngine β€” bestie, this is the one that destroys a text engine that was made for drawing text onto SDL surfaces. Rips it right out. Gone. Periodt.

This page lives in the SDL_ttf3 manual, section 3 (that's the library-functions section, iykyk).


✨ HEADER FILE ✨

It's defined in SDL3_ttf/SDL_ttf.h, so that's where you go looking if you wanna see the receipts.


πŸŽ€ SYNOPSIS πŸŽ€

#include "SDL3_ttf/SDL_ttf.h"

void TTF_DestroySurfaceTextEngine(TTF_TextEngine *engine);

Like… that's it. One function, one pointer, zero return value. It's giving minimalism. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea, and it's important tea: all text created by this engine should be destroyed before calling this function.

Not me telling you this is a "should" and not a *"must"*… but bestie, read the room. Clean up your text first, then nuke the engine. That's the order. That's the vibe. πŸ™ˆ

🌸 FUNCTION PARAMETERS 🌸

  • engine β€” a TTF_TextEngine object, and specifically one that you created with TTF_CreateSurfaceTextEngine(). Don't be bringing some random engine in here, the girls will know. ✨

🧚 THREAD SAFETY 🧚

This function should be called on the thread that created the engine. Same thread, no cap. Don't be hopping threads like it's a group chat β€” the engine's gotta go out the same door it came in. 🫢


⭐ AVAILABILITY ⭐

This function is available since SDL_ttf 3.0.0. She's been here a minute, she's iconic, she's not new. πŸ‘‘


🌈 SEE ALSO 🌈

  • β€’(3)
  • TTF_CreateSurfaceTextEngine(3) β€” the glow-up that made this engine in the first place, so like, obviously go read that one too πŸ’œ

That's the whole page, babe β€” go forth and free your memory responsibly. πŸŽ€βœ¨

Source & version: SDL_ttf 3.2.2 (dated with the SDL_ttf manual's own timestamp, mwah πŸ’‹). Byeee! πŸ¦‹πŸ’–

πŸ“¦ where this page comes from