WAFFLE_TEARDOWN(3)

πŸ‘‹ WAFFLE_TEARDOWN(3) β€” the waffle manual, bestie edition ✨

okay so. welcome to the page about waffle_teardown, part of the waffle manual. section 3. let's get into it πŸ’…


🌸 NAME 🌸

waffle_teardown β€” tear down waffle's per-process global state 🧹✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <waffle.h>

bool waffle_teardown(void);

πŸ’– DESCRIPTION πŸ’–

Feature test macro: WAFFLE_API_VERSION >= 0x0106. (go peek at waffle_feature_test_macros(7) for the deets 🫢)

waffle_teardown() tears down the per-process global state of the waffle library. like. it's the cleanup era. the closing credits. the "okay pack it up" moment πŸŽ€

and listen β€” a call to waffle_teardown() can fail. it's not always gonna eat, and if it doesn't, the caller is advised to use waffle_error_get_info, waffle_error_get_code and/or waffle_error_to_string to retrieve the error. that's your group chat debrief, use it πŸ“±

⚠️ now the serious part, no cap: in case of an error that differs from WAFFLE_ERROR_NOT_INITIALIZED, the caller should not use the Waffle API, because the global state is likely to be in an undetermined/corrupt state. like genuinely, do not touch it. stepped on, don't eat πŸ’€ in the case of WAFFLE_ERROR_NOT_INITIALIZED, though? you should call waffle_init() prior to reusing Waffle. simple as that πŸ’…

🌈 RETURN VALUE 🌈

  • Functions whose return type is bool return true on success and false on failure.
  • Functions whose return type is a pointer return NULL on failure.

and bestie, use waffle_error_get_info(3) to get information about any errors. always check the receipts 🧾✨


πŸ”₯ ERRORS πŸ”₯

see waffle_error(3) for the complete list of waffle's error codes. the whole menu fr fr πŸ‘‘

  • WAFFLE_ERROR_NOT_INITIALIZED β€” Waffle has not been initialized with a successful call to waffle_init() since the last call to waffle_teardown() or the start of the program. basically you're trying to teardown something that was never set up. it's giving "closing a tab you never opened" πŸ™ˆ

🌸 ISSUES 🌸

please report bugs or and feature requests to https://gitlab.freedesktop.org/mesa/waffle/issues. drop the link in the chat, we'll look at it together 🫢


⭐ SEE ALSO ⭐


πŸ‘‘ AUTHOR πŸ‘‘

Emil Velikov <emil.l.velikov@gmail.com>

  • Maintainer

we stan 🫢✨


Copyright Β© 2013 Intel

This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.


and that's the whole page, bestie πŸ’– this one was shipped by waffle, dated 07/06/2026, living in section 3 as WAFFLE_TEARDOWN(3). slay, go forth and tear it down responsibly πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from